MatrixMemoryPool_lc Derived Type

type, public :: MatrixMemoryPool_lc

A memory pool datatype that can be reused for matrix matrix multiplication. this is to prevent excessive alloc/dealloc.


Contents


Components

TypeVisibility AttributesNameInitial
integer, public :: columns

Shape of matrix: columns

integer, public :: rows

Shape of matrix: rows

type(Triplet_c), public, DIMENSION(:), ALLOCATABLE:: pruned_list

storage for actual values added to the matrix.

complex(kind=NTCOMPLEX), public, DIMENSION(:,:), ALLOCATABLE:: value_array

storage for potential values added to the matrix.

logical, public, DIMENSION(:,:), ALLOCATABLE:: dirty_array

true if an element has been pushed to this part of the matrix.

integer, public, DIMENSION(:,:), ALLOCATABLE:: hash_index

Storage space for indices, hashed.

integer, public, DIMENSION(:,:), ALLOCATABLE:: inserted_per_bucket

Internal storage space for amount of items added to a bucket.

integer, public :: hash_size

Size of the buckets.


Constructor

public interface MatrixMemoryPool_lc

  • private function ConstructMatrixMemoryPool_lc(columns, rows, sparsity_in) result(this)

    Construct Matrix Memory Pool object.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=c_int), intent(in) :: columns

    Number of columns in the matrix.

    integer(kind=c_int), intent(in) :: rows

    Number of rows in the matrix.

    real(kind=NTREAL), intent(in), optional :: sparsity_in

    Estimated sparsity (optional).

    Return Value type(MatrixMemoryPool_lc), TARGET

    The matrix to construct.