|
CP2K 2.4 (Revision 12889)
|
DBCSR work matrix utilities. More...
Classes | |
| interface | dbcsr_create |
| struct | i_array_p |
Functions | |
| subroutine | dbcsr_create_new (matrix, name, dist, matrix_type, row_blk_size, col_blk_size, nblks, nze, data_type, data_memory_type, index_memory_type, reuse, mutable_work, replication_type, error) |
| Creates a matrix, allocating the essentials. | |
| subroutine | dbcsr_create_template (matrix, template, name, dist, matrix_type, row_blk_size, col_blk_size, nblks, nze, data_type, data_memory_type, index_memory_type, reuse, mutable_work, replication_type, error) |
| subroutine | dbcsr_init_wm (wm, data_type, nblks_guess, sizedata_guess, error) |
| Initializes one work matrix. | |
| subroutine, public | dbcsr_work_create (matrix, nblks_guess, sizedata_guess, n, work_mutable, error) |
| Creates a the working matrix(es) for a DBCSR matrix. | |
| subroutine, public | dbcsr_finalize (matrix, resort, reshuffle, error) |
| Creates the final dbcsr_type matrix from the working matrix. | |
| subroutine, public | dbcsr_special_finalize (matrix, reshuffle, error) |
| LOGICAL | can_quickly_finalize (matrix) |
| Checks whether the matrix can be finalized with minimal copying. | |
| subroutine | quick_finalize (matrix, error) |
| Performs quick finalization of matrix. | |
| subroutine, public | dbcsr_add_wm_from_matrix (matrix, limits, error) |
| Creates a work matrix from the data present in a finalized matrix. | |
| subroutine | dbcsr_fill_wm_from_matrix (wm, matrix, size_used, limits, error) |
| Fills index and data of the work matrix from the previously-finalized one. | |
| LOGICAL | within_limits (row, column, limits) |
| Checks whether a point is within bounds. | |
| subroutine, public | dbcsr_work_destroy (wm) |
| Deallocates and destroys a work matrix. | |
| subroutine | dbcsr_work_destroy_all (m) |
| Deallocates and destroys a work matrix. | |
| subroutine, public | add_work_coordinate (matrix, row, col, blk, index, error) |
| Adds a coordinate (or other data) into a work matrix's row_i and col_i arrays and returns its position. | |
| pure subroutine | dbcsr_count_wm (row_i, col_i, row_block_sizes, col_block_sizes, nblks, nze) |
| Count actual size taken by work matrix. | |
| subroutine | dbcsr_merge_all (matrix, old_row_p, old_col_i, old_blk_p, data_starting_offset, sort_data, error) |
| Merge data from matrix and work matrices into the final matrix. | |
| subroutine | dbcsr_merge_single_wm (matrix, error) |
| Each thread has a work matrix. These must be merged and made into a new index. If sort_data is False, then the data areas are simply appended. This is probably quicker but the data blocks are not in order and the data size may expand beyond what is needed. If sort_data is True, then data blocks are sorted in order. | |
| subroutine | merge_index (new_row_p, new_col_i, new_blk_p, blk_d, old_row_p, old_col_i, old_blk_p, all_row_p, all_col_i, all_blk_p, all_data_offsets, nwms, nrows, max_row_count, sort_data, error) |
| There is a single work matrix. Data blocks are sorted and copied into the matrix data area (which is empty). The index is made consistent. | |
Variables | |
| CHARACTER(len=*), parameter, private | moduleN = 'dbcsr_work_operations' |
| REAL, parameter | default_resize_factor = 1.618034 |
| LOGICAL, parameter | careful_mod = .FALSE. |
DBCSR work matrix utilities.
Modification history:
| subroutine,public dbcsr_work_operations::add_work_coordinate | ( | TYPE(dbcsr_work_type),intent(inout) | matrix, |
| INTEGER,intent(in) | row, | ||
| INTEGER,intent(in) | col, | ||
| INTEGER,intent(in),optional | blk, | ||
| INTEGER,intent(out),optional | index, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Adds a coordinate (or other data) into a work matrix's row_i and col_i arrays and returns its position.
| [in,out] | matrix | work matrix |
| [in] | row,col | row, col data to add |
| [in] | blk | (optional) block pointer to add |
| [out] | index | (optional) saved position |
| error | cp2k error |
Definition at line 1372 of file dbcsr_work_operations.f90.
References dbcsr_data_methods::careful_mod, dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), and dbcsr_data_methods::default_resize_factor.
Referenced by cp_dbcsr_operations::copy_cfm_to_dbcsr(), cp_dbcsr_operations::copy_fm_to_dbcsr(), and dbcsr_fill_wm_from_matrix().
Here is the call graph for this function:
Here is the caller graph for this function:| LOGICAL dbcsr_work_operations::can_quickly_finalize | ( | TYPE(dbcsr_obj),intent(in) | matrix | ) | [private] |
Checks whether the matrix can be finalized with minimal copying.
| [in] | matrix | matrix to check |
Definition at line 1023 of file dbcsr_work_operations.f90.
References dbcsr_data_methods::dbcsr_data_get_memory_type(), and dbcsr_methods::dbcsr_wm_use_mutable().
Referenced by dbcsr_finalize(), and dbcsr_special_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_work_operations::dbcsr_add_wm_from_matrix | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| INTEGER,dimension(4),intent(in),optional | limits, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Creates a work matrix from the data present in a finalized matrix.
| [in,out] | matrix | DBCSR matrix |
| [in] | limits | (optional) the limits to use for copying |
| [in,out] | error | error |
Definition at line 1104 of file dbcsr_work_operations.f90.
References dbcsr_error_handling::dbcsr_caller_error, dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_fill_wm_from_matrix(), dbcsr_error_handling::dbcsr_internal_error, dbcsr_error_handling::dbcsr_warning_level, and dbcsr_work_create().
Referenced by dbcsr_finalize(), and dbcsr_operations::dbcsr_multiply_anytype().
Here is the call graph for this function:
Here is the caller graph for this function:| pure subroutine dbcsr_work_operations::dbcsr_count_wm | ( | INTEGER,dimension(nblks),intent(in) | row_i, |
| INTEGER,dimension(nblks),intent(in) | col_i, | ||
| INTEGER,dimension(:),intent(in) | row_block_sizes, | ||
| INTEGER,dimension(:),intent(in) | col_block_sizes, | ||
| INTEGER,intent(in) | nblks, | ||
| INTEGER,intent(out) | nze | ||
| ) | [private] |
Count actual size taken by work matrix.
| [in] | row_i | row indices |
| [in] | col_i | column indices |
| [in] | row_block_sizes | offsets of rows |
| [in] | col_block_sizes | offsets of columns |
| [in] | nblks | number of blocks |
| [out] | nze | counted data size |
Definition at line 1413 of file dbcsr_work_operations.f90.
| subroutine dbcsr_work_operations::dbcsr_create_new | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| CHARACTER(len=*),intent(in) | name, | ||
| TYPE(dbcsr_distribution_obj),intent(in) | dist, | ||
| CHARACTER,intent(in) | matrix_type, | ||
| TYPE(array_i1d_obj),intent(in) | row_blk_size, | ||
| TYPE(array_i1d_obj),intent(in) | col_blk_size, | ||
| INTEGER,intent(in),optional | nblks, | ||
| INTEGER,intent(in),optional | nze, | ||
| INTEGER,intent(in),optional | data_type, | ||
| INTEGER,intent(in),optional | data_memory_type, | ||
| INTEGER,intent(in),optional | index_memory_type, | ||
| LOGICAL,intent(in),optional | reuse, | ||
| LOGICAL,intent(in),optional | mutable_work, | ||
| CHARACTER,intent(in),optional | replication_type, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Creates a matrix, allocating the essentials.
| [in,out] | matrix | new matrix |
| [in] | dist | distribution_2d distribution |
| [in] | matrix_type | 'N' for normal, 'T' for transposed, 'S' for symmetric, and 'A' for antisymmetric |
| [in] | nblks | (optional) number of blocks |
| [in] | nze | (optional) number of elements |
| [in] | data_type | type of data from [rRcC] for single/double precision real/complex, default is 'R' |
| [in] | memory_type | (optional) allocate indices and data using special memory |
| [in] | index_memory_type | (optional) allocate indices using special memory |
| [in] | reuse | (optional) reuses an existing matrix, default is to create a fresh one |
| [in] | mutable_work | uses the mutable data for working and not the append-only data; default is append-only |
| [in] | replication_type | replication to be used for this matrix; default is dbcsr_repl_none |
| [in,out] | error | cp2k error |
Definition at line 158 of file dbcsr_work_operations.f90.
References dbcsr_util::convert_sizes_to_offsets(), dbcsr_block_buffers::dbcsr_buffers_2d_needed, dbcsr_error_handling::dbcsr_caller_error, dbcsr_data_methods::dbcsr_data_init(), dbcsr_data_methods::dbcsr_data_new(), dbcsr_data_methods::dbcsr_data_set_size_referenced(), dbcsr_methods::dbcsr_distribution_hold(), dbcsr_methods::dbcsr_distribution_ncols(), dbcsr_methods::dbcsr_distribution_nrows(), dbcsr_methods::dbcsr_distribution_release(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_failure_level, dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_magic_number, dbcsr_methods::dbcsr_matrix_counter, dbcsr_types::dbcsr_memory_default, dbcsr_types::dbcsr_meta_size, dbcsr_types::dbcsr_num_slots, dbcsr_types::dbcsr_repl_col, dbcsr_types::dbcsr_repl_full, dbcsr_types::dbcsr_repl_none, dbcsr_types::dbcsr_repl_row, dbcsr_types::dbcsr_slot_nblkcols_local, dbcsr_types::dbcsr_slot_nblkcols_total, dbcsr_types::dbcsr_slot_nblkrows_local, dbcsr_types::dbcsr_slot_nblkrows_total, dbcsr_types::dbcsr_slot_nfullcols_local, dbcsr_types::dbcsr_slot_nfullcols_total, dbcsr_types::dbcsr_slot_nfullrows_local, dbcsr_types::dbcsr_slot_nfullrows_total, dbcsr_types::dbcsr_slot_size, dbcsr_types::dbcsr_type_antihermitian, dbcsr_types::dbcsr_type_antisymmetric, dbcsr_types::dbcsr_type_complex_4, dbcsr_types::dbcsr_type_complex_8, dbcsr_types::dbcsr_type_hermitian, dbcsr_types::dbcsr_type_no_symmetry, dbcsr_types::dbcsr_type_real_4, dbcsr_types::dbcsr_type_real_8, dbcsr_types::dbcsr_type_real_default, dbcsr_types::dbcsr_type_symmetric, dbcsr_error_handling::dbcsr_unimplemented_error_nr, dbcsr_error_handling::dbcsr_warning_level, dbcsr_work_destroy_all(), dbcsr_error_handling::dbcsr_wrong_args_error, and error.
Here is the call graph for this function:| subroutine dbcsr_work_operations::dbcsr_create_template | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| TYPE(dbcsr_obj),intent(in) | template, | ||
| CHARACTER(len=*),intent(in),optional | name, | ||
| TYPE(dbcsr_distribution_obj),intent(in),optional | dist, | ||
| CHARACTER,intent(in),optional | matrix_type, | ||
| TYPE(array_i1d_obj),intent(in),optional | row_blk_size, | ||
| TYPE(array_i1d_obj),intent(in),optional | col_blk_size, | ||
| INTEGER,intent(in),optional | nblks, | ||
| INTEGER,intent(in),optional | nze, | ||
| INTEGER,intent(in),optional | data_type, | ||
| INTEGER,intent(in),optional | data_memory_type, | ||
| INTEGER,intent(in),optional | index_memory_type, | ||
| LOGICAL,intent(in),optional | reuse, | ||
| LOGICAL,intent(in),optional | mutable_work, | ||
| CHARACTER,intent(in),optional | replication_type, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Definition at line 421 of file dbcsr_work_operations.f90.
References dbcsr_methods::dbcsr_col_block_sizes(), dbcsr_methods::dbcsr_distribution(), dbcsr_methods::dbcsr_get_data_memory_type(), dbcsr_methods::dbcsr_get_index_memory_type(), dbcsr_methods::dbcsr_get_matrix_type(), dbcsr_methods::dbcsr_get_replication_type(), dbcsr_methods::dbcsr_name(), dbcsr_methods::dbcsr_row_block_sizes(), dbcsr_types::dbcsr_slot_home_coli, dbcsr_types::dbcsr_slot_home_pcol, dbcsr_types::dbcsr_slot_home_prow, dbcsr_types::dbcsr_slot_home_rowi, dbcsr_types::dbcsr_slot_home_vpcol, dbcsr_types::dbcsr_slot_home_vprow, dbcsr_methods::dbcsr_use_mutable(), and error.
Here is the call graph for this function:| subroutine dbcsr_work_operations::dbcsr_fill_wm_from_matrix | ( | TYPE(dbcsr_work_type),dimension(:),intent(inout) | wm, |
| TYPE(dbcsr_obj),intent(inout) | matrix, | ||
| INTEGER,intent(in) | size_used, | ||
| INTEGER,dimension(4),intent(in),optional | limits, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Fills index and data of the work matrix from the previously-finalized one.
| [in,out] | wm | the work matrix to fill |
| [in,out] | matrix | DBCSR matrix |
| [in] | limits | (optional) only fills blocks within this range |
| [in,out] | error | error |
Definition at line 1168 of file dbcsr_work_operations.f90.
References add_work_coordinate(), dbcsr_data_methods::dbcsr_data_clear_pointer(), dbcsr_data_operations::dbcsr_data_copyall(), dbcsr_data_methods::dbcsr_data_ensure_size(), dbcsr_data_methods::dbcsr_data_get_size(), dbcsr_data_methods::dbcsr_data_get_size_referenced(), dbcsr_data_methods::dbcsr_data_get_type(), dbcsr_data_methods::dbcsr_data_init(), dbcsr_data_methods::dbcsr_data_new(), dbcsr_data_methods::dbcsr_data_release(), dbcsr_data_methods::dbcsr_data_set_size_referenced(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_iterator_operations::dbcsr_iterator_blocks_left(), dbcsr_methods::dbcsr_mutable_instantiated(), dbcsr_methods::dbcsr_mutable_new(), dbcsr_error_handling::dbcsr_unimplemented_error_nr, dbcsr_methods::dbcsr_wm_use_mutable(), and within_limits().
Referenced by dbcsr_add_wm_from_matrix().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_work_operations::dbcsr_finalize | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| LOGICAL,intent(in),optional | resort, | ||
| LOGICAL,intent(in),optional | reshuffle, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Creates the final dbcsr_type matrix from the working matrix.
Work matrices (array or tree-based) are merged into the base DBCSR matrix.
If a matrix is marked as having a valid index, then nothing is done.
Deleted blocks are pruned from the index.
| [in,out] | matrix | final matrix |
| [in] | resort | whether the indices should be sorted, default is true |
| [in] | reshuffle | whether the data should be reshuffled, default is false |
| error | cp2k error |
Definition at line 689 of file dbcsr_work_operations.f90.
References can_quickly_finalize(), dbcsr_add_wm_from_matrix(), dbcsr_index_operations::dbcsr_addto_index_array(), dbcsr_block_buffers::dbcsr_buffers_2d_needed, dbcsr_error_handling::dbcsr_caller_error, dbcsr_data_methods::dbcsr_data_get_size(), dbcsr_data_methods::dbcsr_data_get_size_referenced(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_methods::dbcsr_get_data_size_used(), dbcsr_merge_all(), dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_nze, dbcsr_types::dbcsr_slot_row_p, dbcsr_error_handling::dbcsr_warning_level, dbcsr_methods::dbcsr_wm_use_mutable(), dbcsr_work_create(), dbcsr_work_destroy_all(), and quick_finalize().
Referenced by dbcsr_example_1(), dbcsr_example_2(), and dbcsr_example_3().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine dbcsr_work_operations::dbcsr_init_wm | ( | TYPE(dbcsr_work_type),intent(out) | wm, |
| INTEGER,intent(in) | data_type, | ||
| INTEGER,intent(in),optional | nblks_guess, | ||
| INTEGER,intent(in),optional | sizedata_guess, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Initializes one work matrix.
| [out] | wm | initialized work matrix |
| [in] | nblks_guess | (optional) estimated number of blocks |
| [in] | sizedata_guess | (optional) estimated size of data |
Definition at line 534 of file dbcsr_work_operations.f90.
References dbcsr_data_methods::dbcsr_data_init(), dbcsr_data_methods::dbcsr_data_new(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_methods::dbcsr_mutable_init(), and dbcsr_error_handling::dbcsr_wrong_args_error.
Referenced by dbcsr_work_create().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine dbcsr_work_operations::dbcsr_merge_all | ( | TYPE(dbcsr_type),intent(inout) | matrix, |
| INTEGER,dimension(*),intent(in) | old_row_p, | ||
| INTEGER,dimension(*),intent(in) | old_col_i, | ||
| INTEGER,dimension(*),intent(in) | old_blk_p, | ||
| INTEGER,intent(in) | data_starting_offset, | ||
| LOGICAL,intent(in) | sort_data, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Merge data from matrix and work matrices into the final matrix.
| [in,out] | matrix | matrix to work on |
| [in] | data_starting_offset | Where to add data |
| [in] | sort_data | whether data will be fully sorted |
| [in,out] | error | error |
Definition at line 1440 of file dbcsr_work_operations.f90.
References dbcsr_index_operations::dbcsr_addto_index_array(), dbcsr_data_methods::dbcsr_data_ensure_size(), dbcsr_data_methods::dbcsr_data_get_memory_type(), dbcsr_data_methods::dbcsr_data_get_size_referenced(), dbcsr_data_methods::dbcsr_data_get_type(), dbcsr_data_methods::dbcsr_data_hold(), dbcsr_data_methods::dbcsr_data_init(), dbcsr_data_methods::dbcsr_data_new(), dbcsr_data_methods::dbcsr_data_release(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_nblks, dbcsr_types::dbcsr_slot_nze, dbcsr_types::dbcsr_slot_row_p, dbcsr_types::dbcsr_type_complex_4, dbcsr_types::dbcsr_type_complex_8, dbcsr_types::dbcsr_type_real_4, dbcsr_types::dbcsr_type_real_8, dbcsr_methods::dbcsr_wm_use_mutable(), dbcsr_error_handling::dbcsr_wrong_args_error, error, and merge_index().
Referenced by dbcsr_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine dbcsr_work_operations::dbcsr_merge_single_wm | ( | TYPE(dbcsr_type),intent(inout) | matrix, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Each thread has a work matrix. These must be merged and made into a new index. If sort_data is False, then the data areas are simply appended. This is probably quicker but the data blocks are not in order and the data size may expand beyond what is needed. If sort_data is True, then data blocks are sorted in order.
| [in,out] | matrix | matrix to work on |
| [in,out] | error | error |
Definition at line 1741 of file dbcsr_work_operations.f90.
References dbcsr_index_operations::dbcsr_addto_index_array(), dbcsr_error_handling::dbcsr_caller_error, dbcsr_data_methods::dbcsr_data_ensure_size(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_nblks, dbcsr_types::dbcsr_slot_nze, dbcsr_types::dbcsr_slot_row_p, and dbcsr_methods::dbcsr_wm_use_mutable().
Referenced by dbcsr_special_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_work_operations::dbcsr_special_finalize | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| LOGICAL,intent(in),optional | reshuffle, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Definition at line 917 of file dbcsr_work_operations.f90.
References can_quickly_finalize(), dbcsr_block_buffers::dbcsr_buffers_2d_needed, dbcsr_error_handling::dbcsr_caller_error, dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_merge_single_wm(), dbcsr_work_destroy_all(), and quick_finalize().
Here is the call graph for this function:| subroutine,public dbcsr_work_operations::dbcsr_work_create | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| INTEGER,intent(in),optional | nblks_guess, | ||
| INTEGER,intent(in),optional | sizedata_guess, | ||
| INTEGER,intent(in),optional | n, | ||
| LOGICAL,intent(in),optional | work_mutable, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Creates a the working matrix(es) for a DBCSR matrix.
| [out] | matrix | new matrix |
| [in] | nblks_guess | (optional) estimated number of blocks |
| [in] | sizedata_guess | (optional) estimated size of data |
| [in] | n | (optional) number work matrices to create, default is 1 |
| [in] | work_mutable | (optional) use mutable work type, default is what was specified in create |
| [in,out] | error | cp2k error |
Definition at line 600 of file dbcsr_work_operations.f90.
References dbcsr_error_handling::dbcsr_caller_error, dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_init_wm(), dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_magic_number, dbcsr_methods::dbcsr_mutable_new(), dbcsr_error_handling::dbcsr_warning_level, and error.
Referenced by dbcsr_add_wm_from_matrix(), and dbcsr_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_work_operations::dbcsr_work_destroy | ( | TYPE(dbcsr_work_type),intent(inout) | wm | ) |
Deallocates and destroys a work matrix.
| [in,out] | wm | work matrix |
Definition at line 1304 of file dbcsr_work_operations.f90.
References dbcsr_data_methods::dbcsr_data_release(), and dbcsr_methods::dbcsr_mutable_destroy().
Referenced by dbcsr_work_destroy_all().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine dbcsr_work_operations::dbcsr_work_destroy_all | ( | TYPE(dbcsr_type),intent(inout) | m | ) | [private] |
Deallocates and destroys a work matrix.
| [in,out] | wm | work matrix |
| [in,out] | error | cp2k error |
| keepdata | do not deallocate data | |
| keepfinal | do not destroy the final, non-work matrix | |
| keepfinaldata | do not destroy the data in the final, non-work matrix |
Definition at line 1338 of file dbcsr_work_operations.f90.
References dbcsr_error_handling::dbcsr_caller_error, dbcsr_error_handling::dbcsr_warning_level, and dbcsr_work_destroy().
Referenced by dbcsr_create_new(), dbcsr_finalize(), and dbcsr_special_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine dbcsr_work_operations::merge_index | ( | INTEGER,dimension(*),intent(in) | new_row_p, |
| INTEGER,dimension(*),intent(out),target | new_col_i, | ||
| INTEGER,dimension(*),intent(out),target | new_blk_p, | ||
| INTEGER,dimension(*),intent(in),target | blk_d, | ||
| INTEGER,dimension(*),intent(in) | old_row_p, | ||
| INTEGER,dimension(*),intent(in) | old_col_i, | ||
| INTEGER,dimension(*),intent(in) | old_blk_p, | ||
| TYPE(i_array_p),dimension(*),intent(in) | all_row_p, | ||
| TYPE(i_array_p),dimension(*),intent(in) | all_col_i, | ||
| TYPE(i_array_p),dimension(*),intent(in) | all_blk_p, | ||
| INTEGER,dimension(*),intent(in) | all_data_offsets, | ||
| INTEGER,intent(in) | nwms, | ||
| INTEGER,intent(in) | nrows, | ||
| INTEGER,intent(in) | max_row_count, | ||
| LOGICAL,intent(in) | sort_data, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
There is a single work matrix. Data blocks are sorted and copied into the matrix data area (which is empty). The index is made consistent.
| [in] | wm | work matrix |
| [in,out] | additions_per_row | number of blocks and data to add for every row |
| [out] | additions_total | total number of blocks and data to add |
| [out] | blk_p | block sizes of data to add |
| [in,out] | error | error |
Definition at line 1845 of file dbcsr_work_operations.f90.
References dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), and error.
Referenced by dbcsr_merge_all().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine dbcsr_work_operations::quick_finalize | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) | [private] |
Performs quick finalization of matrix.
The data area from the work matrix is accepted as the new matrix's data area and the index is built from the work matrix.
| [in,out] | matrix | matrix to finalize |
| [in,out] | error | error |
Definition at line 1054 of file dbcsr_work_operations.f90.
References dbcsr_index_operations::dbcsr_addto_index_array(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_nblks, dbcsr_types::dbcsr_slot_nze, dbcsr_types::dbcsr_slot_row_p, and dbcsr_methods::dbcsr_switch_data_area().
Referenced by dbcsr_finalize(), and dbcsr_special_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| LOGICAL dbcsr_work_operations::within_limits | ( | INTEGER,intent(in) | row, |
| INTEGER,intent(in) | column, | ||
| INTEGER,dimension(4),intent(in) | limits | ||
| ) | [private] |
Checks whether a point is within bounds.
| [in] | row,column | point to check |
| [in] | limits | limits (low_row, high_row, low_col, high_col) |
Definition at line 1290 of file dbcsr_work_operations.f90.
Referenced by dbcsr_fill_wm_from_matrix().
Here is the caller graph for this function:| LOGICAL,parameter dbcsr_work_operations::careful_mod = .FALSE. |
Definition at line 112 of file dbcsr_work_operations.f90.
| REAL,parameter dbcsr_work_operations::default_resize_factor = 1.618034 |
Definition at line 111 of file dbcsr_work_operations.f90.
| CHARACTER(len=*),parameter,private dbcsr_work_operations::moduleN = 'dbcsr_work_operations' |
Definition at line 109 of file dbcsr_work_operations.f90.
1.7.3