Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Derived types and interfaces | Functions/Subroutines | Variables
fmempool Module Reference

Description

Plain Fortran implementation of a memory pool.

Derived types and interfaces

interface  mp_acquire
 
interface  mp_release
 
type  memslice
 
type  mempool
 

Functions/Subroutines

logical function query_environment (env_var, default_val)
 
integer(kind=8) function get_n_elem (mn, mx)
 
integer function get_omp_world_size ()
 
integer function get_omp_thread_idx ()
 
subroutine mp_acquire_bytes (f_pointer, n_bytes)
 
subroutine mp_release_bytes (c_pointer)
 
subroutine, public mp_init (min_threads, verbosity, disable)
 
subroutine, public mp_finalize ()
 
subroutine, public mp_compactify ()
 
subroutine, public mp_statistics ()
 
logical function, public mp_disabled ()
 
subroutine mp_acquire_double_1d (f_pointer, mn, mx)
 
subroutine mp_release_double_1d (f_pointer)
 
subroutine mp_acquire_double_2d (f_pointer, mn, mx)
 
subroutine mp_release_double_2d (f_pointer)
 
subroutine mp_acquire_double_3d (f_pointer, mn, mx)
 
subroutine mp_release_double_3d (f_pointer)
 
subroutine mp_acquire_double_6d (f_pointer, mn, mx)
 
subroutine mp_release_double_6d (f_pointer)
 
subroutine mp_acquire_real_1d (f_pointer, mn, mx)
 
subroutine mp_release_real_1d (f_pointer)
 
subroutine mp_acquire_real_2d (f_pointer, mn, mx)
 
subroutine mp_release_real_2d (f_pointer)
 
subroutine mp_acquire_real_3d (f_pointer, mn, mx)
 
subroutine mp_release_real_3d (f_pointer)
 
subroutine mp_acquire_real_6d (f_pointer, mn, mx)
 
subroutine mp_release_real_6d (f_pointer)
 
subroutine mp_acquire_int_1d (f_pointer, mn, mx)
 
subroutine mp_release_int_1d (f_pointer)
 
subroutine mp_acquire_int_2d (f_pointer, mn, mx)
 
subroutine mp_release_int_2d (f_pointer)
 
subroutine mp_acquire_int_3d (f_pointer, mn, mx)
 
subroutine mp_release_int_3d (f_pointer)
 
subroutine mp_acquire_int_6d (f_pointer, mn, mx)
 
subroutine mp_release_int_6d (f_pointer)
 

Variables

integer, parameter int_size = 4
 
integer, parameter real_size = 4
 
integer, parameter double_size = 2*real_size
 
integer, parameter n_max_slices = 128
 
type(mempool), dimension(:), pointer, save pool => null()
 
logical, save verbose = .false.
 
logical, save disabled = .false.
 

Data Type Documentation

◆ fmempool::memslice

type fmempool::memslice

Definition at line 48 of file fmempool.F90.

Collaboration diagram for memslice:
Class Members
logical acquired
integer(kind=1), dimension(:), pointer mem

◆ fmempool::mempool

type fmempool::mempool

Definition at line 53 of file fmempool.F90.

Collaboration diagram for mempool:
Class Members
type(memslice), dimension(:), pointer slice

Function/Subroutine Documentation

◆ get_n_elem()

integer(kind=8) function fmempool::get_n_elem ( integer, dimension(:), intent(in)  mn,
integer, dimension(:), intent(in)  mx 
)
private

Definition at line 89 of file fmempool.F90.

Here is the caller graph for this function:

◆ get_omp_thread_idx()

integer function fmempool::get_omp_thread_idx
private

Definition at line 113 of file fmempool.F90.

Here is the caller graph for this function:

◆ get_omp_world_size()

integer function fmempool::get_omp_world_size
private

Definition at line 103 of file fmempool.F90.

Here is the caller graph for this function:

◆ mp_acquire_bytes()

subroutine fmempool::mp_acquire_bytes ( integer(kind=1), dimension(:), pointer  f_pointer,
integer(kind=8), intent(in)  n_bytes 
)
private

Definition at line 122 of file fmempool.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mp_acquire_double_1d()

subroutine fmempool::mp_acquire_double_1d ( double precision, dimension(:), pointer  f_pointer,
integer, dimension(1), intent(in)  mn,
integer, dimension(1), intent(in)  mx 
)
private

Definition at line 299 of file fmempool.F90.

◆ mp_acquire_double_2d()

subroutine fmempool::mp_acquire_double_2d ( double precision, dimension(:, :), pointer  f_pointer,
integer, dimension(2), intent(in)  mn,
integer, dimension(2), intent(in)  mx 
)
private

Definition at line 323 of file fmempool.F90.

◆ mp_acquire_double_3d()

subroutine fmempool::mp_acquire_double_3d ( double precision, dimension(:, :, :), pointer  f_pointer,
integer, dimension(3), intent(in)  mn,
integer, dimension(3), intent(in)  mx 
)
private

Definition at line 348 of file fmempool.F90.

◆ mp_acquire_double_6d()

subroutine fmempool::mp_acquire_double_6d ( double precision, dimension(:, :, :, :, :, :), pointer  f_pointer,
integer, dimension(6), intent(in)  mn,
integer, dimension(6), intent(in)  mx 
)
private

Definition at line 374 of file fmempool.F90.

◆ mp_acquire_int_1d()

subroutine fmempool::mp_acquire_int_1d ( integer, dimension(:), pointer  f_pointer,
integer, dimension(1), intent(in)  mn,
integer, dimension(1), intent(in)  mx 
)
private

Definition at line 511 of file fmempool.F90.

◆ mp_acquire_int_2d()

subroutine fmempool::mp_acquire_int_2d ( integer, dimension(:, :), pointer  f_pointer,
integer, dimension(2), intent(in)  mn,
integer, dimension(2), intent(in)  mx 
)
private

Definition at line 535 of file fmempool.F90.

◆ mp_acquire_int_3d()

subroutine fmempool::mp_acquire_int_3d ( integer, dimension(:, :, :), pointer  f_pointer,
integer, dimension(3), intent(in)  mn,
integer, dimension(3), intent(in)  mx 
)
private

Definition at line 560 of file fmempool.F90.

◆ mp_acquire_int_6d()

subroutine fmempool::mp_acquire_int_6d ( integer, dimension(:, :, :, :, :, :), pointer  f_pointer,
integer, dimension(6), intent(in)  mn,
integer, dimension(6), intent(in)  mx 
)
private

Definition at line 586 of file fmempool.F90.

◆ mp_acquire_real_1d()

subroutine fmempool::mp_acquire_real_1d ( real, dimension(:), pointer  f_pointer,
integer, dimension(1), intent(in)  mn,
integer, dimension(1), intent(in)  mx 
)
private

Definition at line 405 of file fmempool.F90.

◆ mp_acquire_real_2d()

subroutine fmempool::mp_acquire_real_2d ( real, dimension(:, :), pointer  f_pointer,
integer, dimension(2), intent(in)  mn,
integer, dimension(2), intent(in)  mx 
)
private

Definition at line 429 of file fmempool.F90.

◆ mp_acquire_real_3d()

subroutine fmempool::mp_acquire_real_3d ( real, dimension(:, :, :), pointer  f_pointer,
integer, dimension(3), intent(in)  mn,
integer, dimension(3), intent(in)  mx 
)
private

Definition at line 454 of file fmempool.F90.

◆ mp_acquire_real_6d()

subroutine fmempool::mp_acquire_real_6d ( real, dimension(:, :, :, :, :, :), pointer  f_pointer,
integer, dimension(6), intent(in)  mn,
integer, dimension(6), intent(in)  mx 
)
private

Definition at line 480 of file fmempool.F90.

◆ mp_compactify()

subroutine, public fmempool::mp_compactify

Definition at line 235 of file fmempool.F90.

Here is the call graph for this function:

◆ mp_disabled()

logical function, public fmempool::mp_disabled

Definition at line 290 of file fmempool.F90.

◆ mp_finalize()

subroutine, public fmempool::mp_finalize

Definition at line 213 of file fmempool.F90.

Here is the call graph for this function:

◆ mp_init()

subroutine, public fmempool::mp_init ( integer, intent(in), optional  min_threads,
logical, intent(in), optional  verbosity,
logical, intent(in), optional  disable 
)

Definition at line 165 of file fmempool.F90.

Here is the call graph for this function:

◆ mp_release_bytes()

subroutine fmempool::mp_release_bytes ( type(c_ptr)  c_pointer)
private

Definition at line 145 of file fmempool.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mp_release_double_1d()

subroutine fmempool::mp_release_double_1d ( double precision, dimension(:), pointer  f_pointer)
private

Definition at line 316 of file fmempool.F90.

◆ mp_release_double_2d()

subroutine fmempool::mp_release_double_2d ( double precision, dimension(:, :), pointer  f_pointer)
private

Definition at line 341 of file fmempool.F90.

◆ mp_release_double_3d()

subroutine fmempool::mp_release_double_3d ( double precision, dimension(:, :, :), pointer  f_pointer)
private

Definition at line 367 of file fmempool.F90.

◆ mp_release_double_6d()

subroutine fmempool::mp_release_double_6d ( double precision, dimension(:, :, :, :, :, :), pointer  f_pointer)
private

Definition at line 396 of file fmempool.F90.

◆ mp_release_int_1d()

subroutine fmempool::mp_release_int_1d ( integer, dimension(:), pointer  f_pointer)
private

Definition at line 528 of file fmempool.F90.

◆ mp_release_int_2d()

subroutine fmempool::mp_release_int_2d ( integer, dimension(:, :), pointer  f_pointer)
private

Definition at line 553 of file fmempool.F90.

◆ mp_release_int_3d()

subroutine fmempool::mp_release_int_3d ( integer, dimension(:, :, :), pointer  f_pointer)
private

Definition at line 579 of file fmempool.F90.

◆ mp_release_int_6d()

subroutine fmempool::mp_release_int_6d ( integer, dimension(:, :, :, :, :, :), pointer  f_pointer)
private

Definition at line 608 of file fmempool.F90.

◆ mp_release_real_1d()

subroutine fmempool::mp_release_real_1d ( real, dimension(:), pointer  f_pointer)
private

Definition at line 422 of file fmempool.F90.

◆ mp_release_real_2d()

subroutine fmempool::mp_release_real_2d ( real, dimension(:, :), pointer  f_pointer)
private

Definition at line 447 of file fmempool.F90.

◆ mp_release_real_3d()

subroutine fmempool::mp_release_real_3d ( real, dimension(:, :, :), pointer  f_pointer)
private

Definition at line 473 of file fmempool.F90.

◆ mp_release_real_6d()

subroutine fmempool::mp_release_real_6d ( real, dimension(:, :, :, :, :, :), pointer  f_pointer)
private

Definition at line 502 of file fmempool.F90.

◆ mp_statistics()

subroutine, public fmempool::mp_statistics

Definition at line 252 of file fmempool.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ query_environment()

logical function fmempool::query_environment ( character(len=*), intent(in)  env_var,
logical, intent(in)  default_val 
)
private

Definition at line 70 of file fmempool.F90.

Here is the caller graph for this function:

Variable Documentation

◆ disabled

logical, save disabled = .false.

Definition at line 59 of file fmempool.F90.

◆ double_size

integer, parameter double_size = 2*real_size

Definition at line 45 of file fmempool.F90.

◆ int_size

integer, parameter int_size = 4

Definition at line 43 of file fmempool.F90.

◆ n_max_slices

integer, parameter n_max_slices = 128

Definition at line 46 of file fmempool.F90.

◆ pool

type(mempool), dimension(:), pointer, save pool => null()

Definition at line 57 of file fmempool.F90.

◆ real_size

integer, parameter real_size = 4

Definition at line 44 of file fmempool.F90.

◆ verbose

logical, save verbose = .false.

Definition at line 58 of file fmempool.F90.

    Report Typos and Errors