Documentation for module dbcsr_work_operations

DBCSR work matrix utilities

source: dbcsr_work_operations.F
Loading...

Generic procedures:

dbcsr_create

public Subroutines/Functions:

Adds a coordinate (or other data) into a work matrix's row_i and col_i arrays and returns its position.
Creates a work matrix from the data present in a finalized matrix.
Creates the final dbcsr_type matrix from the working matrix.
...
Creates a the working matrix(es) for a DBCSR matrix.
SUBROUTINE
dbcsr_work_destroy (wm)
Deallocates and destroys a work matrix.

Generic procedure dbcsr_create

Creates a matrix, allocating the essentials.

TYPE(dbcsr_type),
INTENT(inout)
:: matrix × ×
CHARACTER(*),
INTENT(in)
:: name ×
CHARACTER(*),
INTENT(in),
OPTIONAL
:: name ×
INTENT(in)
:: dist ×
INTENT(in),
OPTIONAL
:: dist ×
CHARACTER,
INTENT(in)
:: matrix_type ×
CHARACTER,
INTENT(in),
OPTIONAL
:: matrix_type ×
INTEGER,
INTENT(in),
POINTER
:: row_blk_size(:) ×
INTEGER,
INTENT(in),
OPTIONAL, POINTER
:: row_blk_size(:) ×
INTEGER,
INTENT(in),
POINTER
:: col_blk_size(:) ×
INTEGER,
INTENT(in),
OPTIONAL, POINTER
:: col_blk_size(:) ×
INTENT(in),
OPTIONAL
:: row_blk_size_obj ×
INTENT(in),
OPTIONAL
:: col_blk_size_obj ×
INTEGER,
INTENT(in),
OPTIONAL
:: nze × ×
INTEGER,
INTENT(in),
OPTIONAL
:: data_type × ×
INTENT(in),
OPTIONAL
:: data_buffer × ×
INTENT(in),
OPTIONAL
:: data_memory_type × ×
INTENT(in),
OPTIONAL
:: index_memory_type × ×
INTEGER,
INTENT(in),
OPTIONAL
:: max_rbs × ×
INTEGER,
INTENT(in),
OPTIONAL
:: max_cbs × ×
INTENT(in),
OPTIONAL
:: row_blk_offset × ×
INTENT(in),
OPTIONAL
:: col_blk_offset × ×
INTENT(in),
OPTIONAL
:: thread_dist ×
LOGICAL,
INTENT(in),
OPTIONAL
:: reuse ×
LOGICAL,
INTENT(in),
OPTIONAL
:: reuse_arrays × ×
LOGICAL,
INTENT(in),
OPTIONAL
:: mutable_work × ×
LOGICAL,
INTENT(in),
OPTIONAL
:: make_index × ×
CHARACTER,
INTENT(in),
OPTIONAL
:: replication_type × ×
TYPE(dbcsr_type),
INTENT(in)
:: template ×

SUBROUTINEadd_work_coordinate(matrix, row, col, blk, index)

Adds a coordinate (or other data) into a work matrix's row_i and col_i arrays and returns its position.

Arguments:
INTENT(inout)
:: matrix work matrix
INTEGER,
INTENT(in)
:: row row data to add
INTEGER,
INTENT(in)
:: col col data to add
INTEGER,
INTENT(in),
OPTIONAL
:: blk block pointer to add
INTEGER,
INTENT(out),
OPTIONAL
:: index saved position

SUBROUTINEdbcsr_add_wm_from_matrix(matrix, limits)

Creates a work matrix from the data present in a finalized matrix.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix DBCSR matrix
INTEGER,
INTENT(in),
OPTIONAL
:: limits(4) the limits to use for copying

SUBROUTINEdbcsr_finalize(matrix, reshuffle)

Creates the final dbcsr_type matrix from the working matrix.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix final matrix
LOGICAL,
INTENT(in),
OPTIONAL
:: reshuffle whether the data should be reshuffled, default is false

SUBROUTINEdbcsr_special_finalize(matrix, reshuffle)

...

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix ...
LOGICAL,
INTENT(in),
OPTIONAL
:: reshuffle ...

SUBROUTINEdbcsr_work_create(matrix, nblks_guess, sizedata_guess, n, work_mutable, memory_type)

Creates a the working matrix(es) for a DBCSR matrix.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix new matrix
INTEGER,
INTENT(in),
OPTIONAL
:: nblks_guess estimated number of blocks
INTEGER,
INTENT(in),
OPTIONAL
:: sizedata_guess estimated size of data
INTEGER,
INTENT(in),
OPTIONAL
:: n number work matrices to create, default is 1
LOGICAL,
INTENT(in),
OPTIONAL
:: work_mutable use mutable work type, default is what was specified in create
INTENT(in),
OPTIONAL
:: memory_type ...

SUBROUTINEdbcsr_work_destroy(wm)

Deallocates and destroys a work matrix.

Arguments:
INTENT(inout)
:: wm work matrix

SUBROUTINEdbcsr_create_new(matrix, name, dist, matrix_type, row_blk_size, col_blk_size, row_blk_size_obj, col_blk_size_obj, nze, data_type, data_buffer, data_memory_type, index_memory_type, max_rbs, max_cbs, row_blk_offset, col_blk_offset, thread_dist, reuse, reuse_arrays, mutable_work, make_index, replication_type)

Creates a matrix, allocating the essentials.

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix new matrix
CHARACTER(*),
INTENT(in)
:: name ...
INTENT(in)
:: dist distribution_2d distribution
CHARACTER,
INTENT(in)
:: matrix_type 'N' for normal, 'T' for transposed, 'S' for symmetric, and 'A' for antisymmetric
INTEGER,
INTENT(in),
POINTER
:: row_blk_size(:) ...
INTEGER,
INTENT(in),
POINTER
:: col_blk_size(:) ...
INTENT(in),
OPTIONAL
:: row_blk_size_obj ...
INTENT(in),
OPTIONAL
:: col_blk_size_obj ...
INTEGER,
INTENT(in),
OPTIONAL
:: nze number of elements
INTEGER,
INTENT(in),
OPTIONAL
:: data_type type of data from 'rRcC' for single/double precision real/complex, default is 'R'
INTENT(in),
OPTIONAL
:: data_buffer ...
INTENT(in),
OPTIONAL
:: data_memory_type allocate indices and data using special memory
INTENT(in),
OPTIONAL
:: index_memory_type allocate indices using special memory
INTEGER,
INTENT(in),
OPTIONAL
:: max_rbs ...
INTEGER,
INTENT(in),
OPTIONAL
:: max_cbs ...
INTENT(in),
OPTIONAL
:: row_blk_offset ...
INTENT(in),
OPTIONAL
:: col_blk_offset ...
INTENT(in),
OPTIONAL
:: thread_dist ...
LOGICAL,
INTENT(in),
OPTIONAL
:: reuse reuses an existing matrix, default is to create a fresh one
LOGICAL,
INTENT(in),
OPTIONAL
:: reuse_arrays ...
LOGICAL,
INTENT(in),
OPTIONAL
:: mutable_work uses the mutable data for working and not the append-only data; default is append-only
LOGICAL,
INTENT(in),
OPTIONAL
:: make_index ...
CHARACTER,
INTENT(in),
OPTIONAL
:: replication_type replication to be used for this matrix; default is dbcsr_repl_none

SUBROUTINEdbcsr_create_template(matrix, template, name, dist, matrix_type, row_blk_size, col_blk_size, nze, data_type, data_buffer, data_memory_type, index_memory_type, max_rbs, max_cbs, row_blk_offset, col_blk_offset, reuse_arrays, mutable_work, make_index, replication_type)

...

Arguments:
TYPE(dbcsr_type),
INTENT(inout)
:: matrix ...
TYPE(dbcsr_type),
INTENT(in)
:: template ...
CHARACTER(*),
INTENT(in),
OPTIONAL
:: name ...
INTENT(in),
OPTIONAL
:: dist ...
CHARACTER,
INTENT(in),
OPTIONAL
:: matrix_type ...
INTEGER,
INTENT(in),
OPTIONAL, POINTER
:: row_blk_size(:) ...
INTEGER,
INTENT(in),
OPTIONAL, POINTER
:: col_blk_size(:) ...
INTEGER,
INTENT(in),
OPTIONAL
:: nze ...
INTEGER,
INTENT(in),
OPTIONAL
:: data_type ...
INTENT(in),
OPTIONAL
:: data_buffer ...
INTENT(in),
OPTIONAL
:: data_memory_type ...
INTENT(in),
OPTIONAL
:: index_memory_type ...
INTEGER,
INTENT(in),
OPTIONAL
:: max_rbs ...
INTEGER,
INTENT(in),
OPTIONAL
:: max_cbs ...
INTENT(in),
OPTIONAL
:: row_blk_offset ...
INTENT(in),
OPTIONAL
:: col_blk_offset ...
LOGICAL,
INTENT(in),
OPTIONAL
:: reuse_arrays ...
LOGICAL,
INTENT(in),
OPTIONAL
:: mutable_work ...
LOGICAL,
INTENT(in),
OPTIONAL
:: make_index ...
CHARACTER,
INTENT(in),
OPTIONAL
:: replication_type ...