ergo
|
Code for preparing for computation of the Hartree-Fock exchange matrix K. More...
#include <cstring>
#include <vector>
#include <pthread.h>
#include "integrals_2el_K_prep.h"
#include "utilities.h"
#include "integrals_2el_utils.h"
Classes | |
struct | neighbor_basisfunc_struct |
struct | listsStruct |
struct | identify_needed_elements_thread_struct |
struct | distr_idxs_and_factor_struct |
Typedefs | |
typedef int * | intPtr |
Functions | |
static int | find_int_in_sorted_list (const int *list, int listLength, int i) |
static int | find_int_in_list (const int *list, int listLength, int i) |
static void | do_sort_int_list (int *list, int n) |
static int | find_doubles_in_sorted_list (const int *list, int n) |
static int | merge_lists (const int *list_1, int list_1_len, const int *list_2, int list_2_len, int *resultList) |
static int | identify_needed_elements_part (ergo_real threshold, const csr_matrix_struct *dens_CSR, const int noOfNeighborsList[], const neighbor_basisfunc_struct *neighborList, const int maxNoOfNeighbors, int **longList, int *longListCounterList, int myIndex, int noOfParts) |
static void * | identify_needed_elements_thread_func (void *arg) |
static int | identify_needed_elements (ergo_real threshold, const csr_matrix_struct *dens_CSR, const int noOfNeighborsList[], const neighbor_basisfunc_struct *neighborList, int maxNoOfNeighbors, int **longList, int *longListCounterList, int nThreads) |
Tries to predict which elements of K will be needed. More... | |
static int | compare_distr_idxs_and_factor_structs (const void *p1in, const void *p2in) |
int | create_CSR_for_K (const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, const JK::Params &J_K_params, csr_matrix_struct *dens_CSR, csr_matrix_struct *K_CSR, int symmetryFlag) |
Code for preparing for computation of the Hartree-Fock exchange matrix K.
typedef int* intPtr |
|
static |
References distr_idxs_and_factor_struct::i1, distr_idxs_and_factor_struct::i2, and distr_idxs_and_factor_struct::limitingFactor.
Referenced by create_CSR_for_K().
int create_CSR_for_K | ( | const BasisInfoStruct & | basisInfo, |
const IntegralInfo & | integralInfo, | ||
const JK::Params & | J_K_params, | ||
csr_matrix_struct * | dens_CSR, | ||
csr_matrix_struct * | K_CSR, | ||
int | symmetryFlag | ||
) |
References DistributionSpecStructLabeled::basisFuncIndex_1, DistributionSpecStructLabeled::basisFuncIndex_2, compare_distr_idxs_and_factor_structs(), do_output(), ergo_CSR_create(), ergo_CSR_get_max_abs_element(), get_list_of_labeled_distrs(), get_list_of_labeled_distrs_maxLimitingFactor(), neighbor_basisfunc_struct::i, distr_idxs_and_factor_struct::i1, distr_idxs_and_factor_struct::i2, identify_needed_elements(), DistributionSpecStructLabeled::limitingFactor, distr_idxs_and_factor_struct::limitingFactor, LOG_AREA_INTEGRALS, LOG_CAT_ERROR, LOG_CAT_INFO, neighbor_basisfunc_struct::max_CS_factor, BasisInfoStruct::noOfBasisFuncs, JK::Params::noOfThreads_K, output_current_memory_usage(), Util::TimeMeter::print(), and JK::Params::threshold_K.
Referenced by compute_K_by_boxes_sparse(), and compute_K_by_boxes_sparse_nosymm().
|
static |
Referenced by identify_needed_elements_part().
|
static |
Referenced by identify_needed_elements_part().
|
static |
Referenced by identify_needed_elements_part().
|
static |
Referenced by identify_needed_elements_part().
|
static |
Tries to predict which elements of K will be needed.
Use two different lists, a "long list" and a "short list" for each row of K. The "long list" is always sorted so that we can quickly check if a column index is already present.
References do_output(), identify_needed_elements_part(), identify_needed_elements_thread_func(), LOG_AREA_INTEGRALS, LOG_CAT_ERROR, LOG_CAT_INFO, identify_needed_elements_thread_struct::longList, identify_needed_elements_thread_struct::longListCounterList, identify_needed_elements_thread_struct::maxNoOfNeighbors, merge_lists(), csr_matrix_struct::n, identify_needed_elements_thread_struct::nThreads, identify_needed_elements_thread_struct::thread_ID, and identify_needed_elements_thread_struct::threshold.
Referenced by create_CSR_for_K().
|
static |
References do_output(), do_sort_int_list(), ergo_CSR_get_nvalues_singlerow(), ergo_CSR_get_values_singlerow(), find_doubles_in_sorted_list(), find_int_in_list(), find_int_in_sorted_list(), neighbor_basisfunc_struct::i, LOG_AREA_INTEGRALS, LOG_CAT_ERROR, neighbor_basisfunc_struct::max_CS_factor, merge_lists(), csr_matrix_struct::n, csr_matrix_struct::symmetryFlag, and template_blas_fabs().
Referenced by identify_needed_elements(), and identify_needed_elements_thread_func().
|
static |
References identify_needed_elements_thread_struct::dens_CSR, identify_needed_elements_part(), identify_needed_elements_thread_struct::longList, identify_needed_elements_thread_struct::longListCounterList, identify_needed_elements_thread_struct::maxNoOfNeighbors, identify_needed_elements_thread_struct::neighborList, identify_needed_elements_thread_struct::noOfNeighborsList, identify_needed_elements_thread_struct::nThreads, identify_needed_elements_thread_struct::resultCode, identify_needed_elements_thread_struct::thread_ID, and identify_needed_elements_thread_struct::threshold.
Referenced by identify_needed_elements().
|
static |
Referenced by identify_needed_elements(), and identify_needed_elements_part().