#include <cstring>
#include <vector>
#include <pthread.h>
#include "integrals_2el_exchange_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. | |
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) |
typedef int* intPtr |
static int compare_distr_idxs_and_factor_structs | ( | const void * | p1in, | |
const void * | p2in | |||
) | [static] |
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 | |||
) |
static void do_sort_int_list | ( | int * | list, | |
int | n | |||
) | [static] |
static int find_doubles_in_sorted_list | ( | const int * | list, | |
int | n | |||
) | [static] |
static int find_int_in_list | ( | const int * | list, | |
int | listLength, | |||
int | i | |||
) | [static] |
static int find_int_in_sorted_list | ( | const int * | list, | |
int | listLength, | |||
int | i | |||
) | [static] |
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 | |||
) | [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.
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] |
static void* identify_needed_elements_thread_func | ( | void * | arg | ) | [static] |
static int merge_lists | ( | const int * | list_1, | |
int | list_1_len, | |||
const int * | list_2, | |||
int | list_2_len, | |||
int * | resultList | |||
) | [static] |