|
CP2K 2.4 (Revision 12889)
|
Operations on the DBCSR index. More...
Classes | |
| interface | dbcsr_count_row_index |
| interface | dbcsr_build_row_index |
Functions | |
| subroutine | make_index_canonical (new_row_p, new_col_i, new_blk_p, old_row_p, old_col_i, old_blk_p, matrix) |
| Makes a canonical index given the index arrays. | |
| subroutine, public | make_index_triangular (new_row_p, new_col_i, new_blk_p, old_row_p, old_col_i, old_blk_p, matrix) |
| Makes a CP2K triangular index given the index arrays. | |
| pure subroutine, public | dbcsr_make_dbcsr_index (row_p, row_i, nrows, nblks) |
| Collapses a row_p index. | |
| pure subroutine, public | dbcsr_expand_row_index (row_p, row_i, nrows, nblks) |
| Expands a row_p index. | |
| pure subroutine | dbcsr_count_row_index_inplace (rows, nrows) |
| Counts columns-per-row count from row index array, in-place. | |
| pure subroutine | dbcsr_count_row_index_copy (rows, counts, nrows) |
| Counts columns-per-row count from row index array. | |
| pure subroutine | dbcsr_build_row_index_inplace (rows, nrows) |
| Builds row index array from a columns-per-row count, in-place. | |
| pure subroutine | dbcsr_build_row_index_copy (counts, rows, nrows) |
| Builds row index array from a columns-per-row count. | |
| subroutine, public | dbcsr_addto_index_array (matrix, slot, DATA, reservation, extra, error) |
| Adds data to the index. Incleases the index size when neccessary. | |
| subroutine, public | dbcsr_clearfrom_index_array (matrix, slot) |
| The data area was not defined or the new area is greater than the old. | |
| subroutine, public | dbcsr_repoint_index (m, slot) |
| Updates the index pointers of a bcsr matrix. | |
| subroutine, public | dbcsr_make_index_exist (m, error) |
| Creates an index for the matrix. | |
| subroutine, public | dbcsr_sort_indices (n, row_i, col_i, blk_p, blk_d) |
| Sorts the rows & columns of a work matrix. | |
| subroutine, public | dbcsr_sort_many_indices (matrix) |
| Create an ordering for both rows and columns. If the blk_p must be rearranged, then the col_i array will be used as a permutation vector. | |
| subroutine, public | dbcsr_order_matrix_index (matrix, error) |
| Sorts the index of a DBCSR. | |
| subroutine, public | dbcsr_index_prune_deleted (matrix, error) |
| Removes the deleted blocks from the index. | |
| subroutine, public | transpose_index_local (new_col_p, new_row_i, old_row_p, old_col_i, new_blk_p, old_blk_p) |
| Re-indexes row_p and blk_i according to columns. | |
| subroutine, public | dbcsr_make_index_canonical (matrix, cp2k) |
| Makes a canonical index to the distribution. | |
| subroutine, public | make_dense_index (row_p, col_i, blk_p, nblkrows_total, nblkcols_total, myblkrows, myblkcols, row_blk_offsets, col_blk_offsets, meta, make_tr, error) |
| Makes the index for a dense matrix. | |
| subroutine, public | make_undense_index (row_p, col_i, blk_p, distribution, local_row_offsets, local_col_offsets, meta) |
| Makes a blocked index from a dense matrix. | |
| subroutine, public | merge_index_arrays (new_row_i, new_col_i, new_blk_p, new_size, old_row_i, old_col_i, old_blk_p, old_size, add_ip, add_size, new_blk_d, old_blk_d, added_size_offset, added_sizes, added_size, added_nblks, error) |
| Merges two indices. | |
| subroutine, public | dbcsr_make_index_local_row (matrix, error) |
| Converts BCSR global row index to local row index. | |
| subroutine, public | dbcsr_make_index_list (matrix, thread_redist, error) |
| The existing row_p is converted from an indexing array into a counting array. Because it is later discarded, the counting is done in-place. | |
| subroutine, public | dbcsr_index_compact (matrix, error) |
| Compacts an index. | |
| subroutine, public | dbcsr_index_checksum (matrix, checksum, error) |
| Ensures the index pointers are set. | |
| LOGICAL, public | dbcsr_has_local_row_index (matrix) |
Variables | |
| CHARACTER(len=*), parameter, private | moduleN = 'dbcsr_index_operations' |
| LOGICAL, parameter | careful_mod = .FALSE. |
| LOGICAL, parameter | debug_mod = .FALSE. |
Operations on the DBCSR index.
Modification history:
| subroutine,public dbcsr_index_operations::dbcsr_addto_index_array | ( | TYPE(dbcsr_type),intent(inout) | matrix, |
| INTEGER,intent(in) | slot, | ||
| INTEGER,dimension(:),intent(in),optional | DATA, | ||
| INTEGER,intent(in),optional | reservation, | ||
| INTEGER,intent(in),optional | extra, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Adds data to the index. Incleases the index size when neccessary.
| [in,out] | matrix | bcsr matrix |
| [in] | slot | which index array to add (e.g., dbcsr_slot_row_blk_sizes) |
| [in] | data | (optional) array holding the index data to add to the index array |
| [in] | reservation | (optional) only reserve space for subsequent array |
| [in] | extra | (optional) reserve extra space for later additions |
Definition at line 376 of file dbcsr_index_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_failure_level, dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_num_slots, dbcsr_repoint_index(), dbcsr_types::dbcsr_slot_size, debug_mod, and dbcsr_ptr_util::default_resize_factor.
Referenced by dbcsr_work_operations::dbcsr_finalize(), dbcsr_index_compact(), dbcsr_index_prune_deleted(), dbcsr_make_index_exist(), dbcsr_make_index_list(), dbcsr_make_index_local_row(), dbcsr_transformations::dbcsr_make_undense(), dbcsr_work_operations::dbcsr_merge_all(), dbcsr_work_operations::dbcsr_merge_single_wm(), dbcsr_transformations::dbcsr_new_transposed(), dbcsr_block_access::dbcsr_reserve_blocks(), dbcsr_transformations::make_dense(), and dbcsr_work_operations::quick_finalize().
Here is the call graph for this function:
Here is the caller graph for this function:| pure subroutine dbcsr_index_operations::dbcsr_build_row_index_copy | ( | INTEGER,dimension(1:nrows),intent(in) | counts, |
| INTEGER,dimension(1:nrows+1),intent(out) | rows, | ||
| INTEGER,intent(in) | nrows | ||
| ) | [private] |
Builds row index array from a columns-per-row count.
| [in] | nrows | number of rows |
| [in] | counts | count of the number of colums per row |
| [out] | rows | count of the number of colums per row (input); the row_p index (output) |
Definition at line 348 of file dbcsr_index_operations.f90.
References dbcsr_build_row_index_inplace().
Here is the call graph for this function:| pure subroutine dbcsr_index_operations::dbcsr_build_row_index_inplace | ( | INTEGER,dimension(1:nrows+1),intent(inout) | rows, |
| INTEGER,intent(in) | nrows | ||
| ) | [private] |
Builds row index array from a columns-per-row count, in-place.
| [in] | nrows | number of rows |
| [in,out] | rows | count of the number of colums per row (input); the row_p index (output) |
Definition at line 323 of file dbcsr_index_operations.f90.
Referenced by dbcsr_build_row_index_copy(), and dbcsr_make_index_list().
Here is the caller graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_clearfrom_index_array | ( | TYPE(dbcsr_type),intent(inout) | matrix, |
| INTEGER,intent(in) | slot | ||
| ) |
The data area was not defined or the new area is greater than the old.
Removes data from the index.
| [in,out] | matrix | bcsr matrix |
| [in] | slot | which index array to remove (e.g., dbcsr_slot_row_blk_sizes) |
Definition at line 456 of file dbcsr_index_operations.f90.
References dbcsr_error_handling::dbcsr_failure_level, dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_num_slots, dbcsr_repoint_index(), dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_coo_l, dbcsr_types::dbcsr_slot_row_p, dbcsr_types::dbcsr_slot_size, dbcsr_types::dbcsr_slot_thr_c, and debug_mod.
Referenced by dbcsr_index_prune_deleted(), dbcsr_make_index_list(), and dbcsr_make_index_local_row().
Here is the call graph for this function:
Here is the caller graph for this function:| pure subroutine dbcsr_index_operations::dbcsr_count_row_index_copy | ( | INTEGER,dimension(1:nrows+1),intent(in) | rows, |
| INTEGER,dimension(1:nrows),intent(out) | counts, | ||
| INTEGER,intent(in) | nrows | ||
| ) | [private] |
Counts columns-per-row count from row index array.
| [in] | nrows | number of rows |
| [in] | rows | the row_p index (input) |
| [out] | counts | the count of the number of columns per row |
Definition at line 304 of file dbcsr_index_operations.f90.
| pure subroutine dbcsr_index_operations::dbcsr_count_row_index_inplace | ( | INTEGER,dimension(1:nrows+1),intent(inout) | rows, |
| INTEGER,intent(in) | nrows | ||
| ) | [private] |
Counts columns-per-row count from row index array, in-place.
| [in] | nrows | number of rows |
| [in,out] | rows | the row_p index (input); the count of the number of columns per row (output) |
Definition at line 285 of file dbcsr_index_operations.f90.
| pure subroutine,public dbcsr_index_operations::dbcsr_expand_row_index | ( | INTEGER,dimension(1:nrows+1),intent(in) | row_p, |
| INTEGER,dimension(1:nblks),intent(out) | row_i, | ||
| INTEGER,intent(in) | nrows, | ||
| INTEGER,intent(in) | nblks | ||
| ) |
Expands a row_p index.
Definition at line 265 of file dbcsr_index_operations.f90.
Referenced by dbcsr_operations::dbcsr_add_reserved(), dbcsr_operations::dbcsr_insert_blocks(), dbcsr_make_index_list(), and transpose_index_local().
Here is the caller graph for this function:| LOGICAL,public dbcsr_index_operations::dbcsr_has_local_row_index | ( | TYPE(dbcsr_obj),intent(inout) | matrix | ) |
Definition at line 1713 of file dbcsr_index_operations.f90.
| subroutine,public dbcsr_index_operations::dbcsr_index_checksum | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| INTEGER,intent(out) | checksum, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Ensures the index pointers are set.
Calculates the checksum of an index.
| [in] | matrix | matrix for which to make canonical index |
| [in,out] | error | error |
Definition at line 1692 of file dbcsr_index_operations.f90.
References dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), and dbcsr_toollib::joaat_hash().
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_index_compact | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Compacts an index.
| [in,out] | matrix | matrix for which to make canonical index |
| [in,out] | error | error |
Definition at line 1554 of file dbcsr_index_operations.f90.
References careful_mod, dbcsr_addto_index_array(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_error_handling::dbcsr_fatal_level, dbcsr_methods::dbcsr_get_index_memory_type(), dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_meta_size, dbcsr_types::dbcsr_num_slots, dbcsr_repoint_index(), dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_coo_l, dbcsr_types::dbcsr_slot_row_p, dbcsr_types::dbcsr_slot_size, and dbcsr_types::dbcsr_slot_thr_c.
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_index_prune_deleted | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Removes the deleted blocks from the index.
| [in,out] | matrix | Prune the index of this matrix. |
| [in,out] | error | error |
Definition at line 794 of file dbcsr_index_operations.f90.
References dbcsr_addto_index_array(), dbcsr_clearfrom_index_array(), 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, and dbcsr_types::dbcsr_slot_row_p.
Here is the call graph for this function:| pure subroutine,public dbcsr_index_operations::dbcsr_make_dbcsr_index | ( | INTEGER,dimension(1:nrows+1),intent(out) | row_p, |
| INTEGER,dimension(1:nblks),intent(in) | row_i, | ||
| INTEGER,intent(in) | nrows, | ||
| INTEGER,intent(in) | nblks | ||
| ) |
Collapses a row_p index.
Definition at line 232 of file dbcsr_index_operations.f90.
Referenced by make_index_canonical(), make_index_triangular(), and transpose_index_local().
Here is the caller graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_make_index_canonical | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| LOGICAL,intent(in),optional | cp2k | ||
| ) |
Makes a canonical index to the distribution.
| inout] | matrix matrix for which to make canonical index | |
| [in] | cp2k | (optional) make CP2K triangular index from canonical; default is false |
Definition at line 918 of file dbcsr_index_operations.f90.
References make_index_canonical(), and make_index_triangular().
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_make_index_exist | ( | TYPE(dbcsr_type),intent(inout) | m, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Creates an index for the matrix.
| [in,out] | m | Create index for this matrix |
| [in,out] | error | error |
Definition at line 581 of file dbcsr_index_operations.f90.
References dbcsr_addto_index_array(), 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_repoint_index(), dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, and dbcsr_types::dbcsr_slot_row_p.
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_make_index_list | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| LOGICAL,intent(in) | thread_redist, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
The existing row_p is converted from an indexing array into a counting array. Because it is later discarded, the counting is done in-place.
The counts are mapped to local rows, then converted into an index. The local row index replaces the global one. Finally the matrix is designated as having a local-based index. Converts BCSR index into list indices (similar to work matrices)
| [in,out] | matrix | matrix for which to make canonical index |
| [in] | thread_redist | make a thread subdistribution |
| [in,out] | error | error |
Definition at line 1385 of file dbcsr_index_operations.f90.
References dbcsr_addto_index_array(), dbcsr_build_row_index_inplace(), dbcsr_error_handling::dbcsr_caller_error, dbcsr_clearfrom_index_array(), dbcsr_methods::dbcsr_distribution(), dbcsr_methods::dbcsr_distribution_thread_dist(), dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_expand_row_index(), 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_coo_l, dbcsr_types::dbcsr_slot_row_p, dbcsr_types::dbcsr_slot_thr_c, dbcsr_error_handling::dbcsr_unimplemented_error_nr, and dbcsr_error_handling::dbcsr_wrong_args_error.
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_make_index_local_row | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Converts BCSR global row index to local row index.
| [in,out] | matrix | matrix for which to make canonical index |
| [in] | prow | Use this process row |
| [in,out] | error | error |
Definition at line 1298 of file dbcsr_index_operations.f90.
References careful_mod, dbcsr_addto_index_array(), dbcsr_clearfrom_index_array(), 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_home_prow, dbcsr_types::dbcsr_slot_home_vprow, dbcsr_types::dbcsr_slot_row_p, dbcsr_error_handling::dbcsr_unimplemented_error_nr, and dbcsr_error_handling::dbcsr_wrong_args_error.
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_order_matrix_index | ( | TYPE(dbcsr_obj),intent(inout) | matrix, |
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Sorts the index of a DBCSR.
| [in,out] | matrix | matrix for which to sort |
| [in,out] | error | error |
Definition at line 738 of file dbcsr_index_operations.f90.
References dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_methods::dbcsr_nblkcols_total(), and dbcsr_methods::dbcsr_nblkrows_total().
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_repoint_index | ( | TYPE(dbcsr_type),intent(inout) | m, |
| INTEGER,intent(in),optional | slot | ||
| ) |
Updates the index pointers of a bcsr matrix.
| [in,out] | m | matrix for which index pointers are updated |
| [in] | slot | (optional) only repoint this index |
Definition at line 499 of file dbcsr_index_operations.f90.
References dbcsr_types::dbcsr_slot_blk_p, dbcsr_types::dbcsr_slot_col_i, dbcsr_types::dbcsr_slot_coo_l, dbcsr_types::dbcsr_slot_nblks, dbcsr_types::dbcsr_slot_nze, dbcsr_types::dbcsr_slot_row_p, and dbcsr_types::dbcsr_slot_thr_c.
Referenced by dbcsr_addto_index_array(), dbcsr_clearfrom_index_array(), dbcsr_index_compact(), and dbcsr_make_index_exist().
Here is the caller graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_sort_indices | ( | INTEGER,intent(in) | n, |
| INTEGER,dimension(1:n),intent(inout) | row_i, | ||
| INTEGER,dimension(1:n),intent(inout) | col_i, | ||
| INTEGER,dimension(1:n),intent(inout),optional | blk_p, | ||
| INTEGER,dimension(1:n),intent(inout),optional | blk_d | ||
| ) |
Sorts the rows & columns of a work matrix.
| [in] | n | number of blocks (elements) to sort |
| [in,out] | row_i | row indices |
| [in,out] | col_i | column indices |
| [in,out] | blk_p | (optional) block pointers |
| [in,out] | blk_d | (optional) data storage |
Definition at line 629 of file dbcsr_index_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_failure_level, dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, debug_mod, and dbcsr_kinds::int_4.
Referenced by dbcsr_sort_many_indices(), make_index_canonical(), make_index_triangular(), and transpose_index_local().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_index_operations::dbcsr_sort_many_indices | ( | TYPE(dbcsr_type),intent(inout) | matrix | ) |
Create an ordering for both rows and columns. If the blk_p must be rearranged, then the col_i array will be used as a permutation vector.
Now do a nice quicksort. Sorts all work matrices.
| [in,out] | matrix | sort work matrices in this matrix |
Definition at line 709 of file dbcsr_index_operations.f90.
References dbcsr_sort_indices(), and dbcsr_methods::dbcsr_wm_use_mutable().
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::make_dense_index | ( | INTEGER,dimension(1:nblkrows_total+1),intent(out) | row_p, |
| INTEGER,dimension(:),intent(out) | col_i, | ||
| INTEGER,dimension(:),intent(out) | blk_p, | ||
| INTEGER,intent(in) | nblkrows_total, | ||
| INTEGER,intent(in) | nblkcols_total, | ||
| INTEGER,dimension(:),intent(in) | myblkrows, | ||
| INTEGER,dimension(:),intent(in) | myblkcols, | ||
| INTEGER,dimension(:),intent(in) | row_blk_offsets, | ||
| INTEGER,dimension(:),intent(in) | col_blk_offsets, | ||
| INTEGER,dimension(dbcsr_meta_size),intent(inout) | meta, | ||
| LOGICAL,intent(in),optional | make_tr, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Makes the index for a dense matrix.
| [out] | row_p,col_i,blk_p | Storage for new index |
| [in,out] | distribution | Distribution for matrix |
| [in,out] | matrix | Matrix |
| [in,out] | meta | Metadata updates for new index |
| [in] | nblkrows_total | Total blocked rows |
| [in] | nblkcols_total | Total blocked columns |
| [in] | myblkrows | List of blocked rows in my process row |
| [in] | myblkcols | List of blocked columns in my process column |
| [in] | make_tr | Dense blocks are transposed |
Definition at line 965 of file dbcsr_index_operations.f90.
References dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_types::dbcsr_slot_nblkcols_local, dbcsr_types::dbcsr_slot_nblkcols_total, dbcsr_types::dbcsr_slot_nblkrows_local, dbcsr_types::dbcsr_slot_nblkrows_total, debug_mod, and error.
| subroutine dbcsr_index_operations::make_index_canonical | ( | INTEGER,dimension(:),intent(out) | new_row_p, |
| INTEGER,dimension(:),intent(out) | new_col_i, | ||
| INTEGER,dimension(:),intent(out) | new_blk_p, | ||
| INTEGER,dimension(:),intent(in) | old_row_p, | ||
| INTEGER,dimension(:),intent(in) | old_col_i, | ||
| INTEGER,dimension(:),intent(in) | old_blk_p, | ||
| TYPE(dbcsr_type),intent(in) | matrix | ||
| ) | [private] |
Makes a canonical index given the index arrays.
Definition at line 102 of file dbcsr_index_operations.f90.
References dbcsr_make_dbcsr_index(), dbcsr_sort_indices(), debug_mod, and dbcsr_dist_operations::get_stored_canonical().
Referenced by dbcsr_make_index_canonical().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_index_operations::make_index_triangular | ( | INTEGER,dimension(:),intent(out) | new_row_p, |
| INTEGER,dimension(:),intent(out) | new_col_i, | ||
| INTEGER,dimension(:),intent(out) | new_blk_p, | ||
| INTEGER,dimension(:),intent(in) | old_row_p, | ||
| INTEGER,dimension(:),intent(in) | old_col_i, | ||
| INTEGER,dimension(:),intent(in) | old_blk_p, | ||
| TYPE(dbcsr_type),intent(in) | matrix | ||
| ) |
Makes a CP2K triangular index given the index arrays.
Definition at line 169 of file dbcsr_index_operations.f90.
References dbcsr_make_dbcsr_index(), dbcsr_sort_indices(), debug_mod, and dbcsr_dist_operations::get_stored_canonical().
Referenced by dbcsr_make_index_canonical().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public dbcsr_index_operations::make_undense_index | ( | INTEGER,dimension(:),intent(out) | row_p, |
| INTEGER,dimension(:),intent(out) | col_i, | ||
| INTEGER,dimension(:),intent(out) | blk_p, | ||
| TYPE(dbcsr_distribution_obj) | distribution, | ||
| INTEGER,dimension(:),intent(in) | local_row_offsets, | ||
| INTEGER,dimension(:),intent(in) | local_col_offsets, | ||
| INTEGER,dimension(dbcsr_meta_size),intent(inout) | meta | ||
| ) |
Makes a blocked index from a dense matrix.
| [out] | row_p,col_i,blk_p | Storage for new index |
| [in] | distribution | Blocked distribution |
| [in] | row_blk_offsets | Row block offsets |
| [in] | col_blk_offsets | Column block offsets |
| [in,out] | meta | Metadata updates for new index |
Definition at line 1052 of file dbcsr_index_operations.f90.
References dbcsr_methods::dbcsr_distribution_local_cols(), dbcsr_methods::dbcsr_distribution_local_rows(), dbcsr_methods::dbcsr_distribution_ncols(), dbcsr_methods::dbcsr_distribution_nlocal_cols(), dbcsr_methods::dbcsr_distribution_nlocal_rows(), dbcsr_methods::dbcsr_distribution_nrows(), dbcsr_types::dbcsr_slot_nblkcols_local, dbcsr_types::dbcsr_slot_nblkcols_total, dbcsr_types::dbcsr_slot_nblkrows_local, dbcsr_types::dbcsr_slot_nblkrows_total, and dbcsr_types::dbcsr_slot_nfullcols_local.
Here is the call graph for this function:| subroutine,public dbcsr_index_operations::merge_index_arrays | ( | INTEGER,dimension(new_size),intent(out) | new_row_i, |
| INTEGER,dimension(new_size),intent(out) | new_col_i, | ||
| INTEGER,dimension(new_size),intent(out) | new_blk_p, | ||
| INTEGER,intent(in) | new_size, | ||
| INTEGER,dimension(old_size),intent(in) | old_row_i, | ||
| INTEGER,dimension(old_size),intent(in) | old_col_i, | ||
| INTEGER,dimension(old_size),intent(in) | old_blk_p, | ||
| INTEGER,intent(in) | old_size, | ||
| INTEGER,dimension(3, add_size),intent(in) | add_ip, | ||
| INTEGER,intent(in) | add_size, | ||
| INTEGER,dimension(new_size),intent(out),optional | new_blk_d, | ||
| INTEGER,dimension(old_size),intent(in),optional | old_blk_d, | ||
| INTEGER,intent(in),optional | added_size_offset, | ||
| INTEGER,dimension(:),intent(in),optional | added_sizes, | ||
| INTEGER,intent(out),optional | added_size, | ||
| INTEGER,intent(out),optional | added_nblks, | ||
| TYPE(dbcsr_error_type),intent(inout) | error | ||
| ) |
Merges two indices.
Assumes they are both pre-sorted
| [in,out] | new_row_i,new_col_i,new_blk_p | merged result |
| [in] | new_size | size of merged index |
| [in,out] | old_row_i,old_col_i,old_blk_p | current index |
| [in] | old_size | size of current index |
| [in] | add_ip | index to add into the current index |
| [in] | add_size | size of index to add into the current index |
| [in] | added_size_offset | (optional) specify base of added sizes |
| [in] | added_sizes | (optional) specify sizes of added blocks |
| [out] | added_size | (optional) counts number of sizes of added blocks |
| [out] | added_nblks | (optional) actual number of new elements |
| [in,out] | error | error |
Definition at line 1134 of file dbcsr_index_operations.f90.
References dbcsr_error_handling::dbcsr_fatal_level, dbcsr_error_handling::dbcsr_internal_error, dbcsr_error_handling::dbcsr_warning_level, dbcsr_error_handling::dbcsr_wrong_args_error, debug_mod, and error.
| subroutine,public dbcsr_index_operations::transpose_index_local | ( | INTEGER,dimension(:),intent(out) | new_col_p, |
| INTEGER,dimension(:),intent(out) | new_row_i, | ||
| INTEGER,dimension(:),intent(in) | old_row_p, | ||
| INTEGER,dimension(:),intent(in) | old_col_i, | ||
| INTEGER,dimension(:),intent(out),optional | new_blk_p, | ||
| INTEGER,dimension(:),intent(in),optional | old_blk_p | ||
| ) |
Re-indexes row_p and blk_i according to columns.
| [out] | new_col_p | new column pointer |
| [out] | new_row_i | new row index |
| [in] | old_row_p | old row pointer |
| [in] | old_col_i | old column index |
| [out] | new_blk_p | (optional) new block pointer |
| [in] | old_blk_p | (optional) old block pointer |
Definition at line 875 of file dbcsr_index_operations.f90.
References dbcsr_error_handling::dbcsr_error_set(), dbcsr_error_handling::dbcsr_error_stop(), dbcsr_expand_row_index(), dbcsr_make_dbcsr_index(), and dbcsr_sort_indices().
Here is the call graph for this function:| LOGICAL,parameter dbcsr_index_operations::careful_mod = .FALSE. |
Definition at line 55 of file dbcsr_index_operations.f90.
Referenced by dbcsr_index_compact(), and dbcsr_make_index_local_row().
| LOGICAL,parameter dbcsr_index_operations::debug_mod = .FALSE. |
Definition at line 56 of file dbcsr_index_operations.f90.
Referenced by dbcsr_addto_index_array(), dbcsr_clearfrom_index_array(), dbcsr_sort_indices(), make_dense_index(), make_index_canonical(), make_index_triangular(), and merge_index_arrays().
| CHARACTER(len=*),parameter,private dbcsr_index_operations::moduleN = 'dbcsr_index_operations' |
Definition at line 52 of file dbcsr_index_operations.f90.
1.7.3