This c++ driver provides a few examples to illustrate the c++ interface to ButterflyPACK's Fortran subroutines, particularly the entry-evaluation and matvec-based APIs. This file works on the double data type. More...
#include <iostream>
#include <math.h>
#include <fstream>
#include <time.h>
#include <stdlib.h>
#include <sstream>
#include <string>
#include <iomanip>
#include <memory>
#include <pthread.h>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <atomic>
#include <mpi.h>
#include <cstring>
#include <getopt.h>
#include <unistd.h>
#include "dC_BPACK_wrapper.h"
Classes | |
class | C_QuantApp |
Functions | |
void | Cblacs_exit (int) |
double | dist2 (double *x, double *y, int d) |
double | dot_product (double *v, double *u, int d) |
double | Gauss_kernel (double *x, double *y, int d, double h) |
double | Laplace_kernel (double *x, double *y, int d, double h) |
double | K07_kernel (double *x, double *y, int d) |
double | K08_kernel (double *x, double *y, int d, double h) |
double | K09_kernel (double *x, double *y, int d, double h) |
double | K10_kernel (double *x, double *y, int d, double h) |
double | GreenFun (int m, double w, double v0, double tau) |
double | GreenFun_kernel (double *x, double *y, int d, double w) |
void | C_FuncZmn (int *m, int *n, double *val, C2Fptr quant) |
void | C_FuncBZmn (int *m, int *n, double *val, C2Fptr quant) |
void | C_FuncDistmn (int *m, int *n, double *val, C2Fptr quant) |
void | C_FuncNearFar (int *m, int *n, int *val, C2Fptr quant) |
void | C_FuncZmnBlock (int *Ninter, int *Nallrows, int *Nallcols, int64_t *Nalldat_loc, int *allrows, int *allcols, double *alldat_loc, int *rowidx, int *colidx, int *pgidx, int *Npmap, int *pmaps, C2Fptr quant) |
void | C_FuncBZmnBlock (int *Ninter, int *Nallrows, int *Nallcols, int64_t *Nalldat_loc, int *allrows, int *allcols, double *alldat_loc, int *rowidx, int *colidx, int *pgidx, int *Npmap, int *pmaps, C2Fptr quant) |
void | C_FuncHMatVec (char const *trans, int *nin, int *nout, int *nvec, double const *xin, double *xout, C2Fptr quant) |
void | C_FuncBMatVec (char const *trans, int *nin, int *nout, int *nvec, double const *xin, double *xout, C2Fptr quant, double *a, double *b) |
template<typename T > | |
vector< T > | write_from_file (string filename) |
void | set_option_from_command_line (int argc, const char *const *cargv, F2Cptr option0) |
int | main (int argc, char *argv[]) |
Variables | |
const double | pi = 4.0 * atan(1.0) |
This c++ driver provides a few examples to illustrate the c++ interface to ButterflyPACK's Fortran subroutines, particularly the entry-evaluation and matvec-based APIs. This file works on the double data type.
|
inline |
The matvec sampling function wrapper required by the Fortran HODLR code
|
inline |
The sampling function wrapper required by the Fortran HODLR code
|
inline |
The extraction sampling function wrapper required by the Fortran HODLR code
|
inline |
The distance function wrapper required by the Fortran HODLR code
|
inline |
The matvec sampling function wrapper required by the Fortran HODLR code
|
inline |
The compressibility function wrapper required by the Fortran HODLR code
|
inline |
The sampling function wrapper required by the Fortran HODLR code
|
inline |
The extraction sampling function wrapper required by the Fortran HODLR code
void Cblacs_exit | ( | int | ) |
|
inline |
2-norm distance
|
inline |
dot product of two real vectors
|
inline |
Gauss Kernel
|
inline |
|
inline |
|
inline |
R^4 kernel
|
inline |
sqrt(R^2+h) kernel
|
inline |
1/sqrt(R^2+h) kernel
|
inline |
Polynomial kernel (X^tY+h)^2
|
inline |
Laplacian/Exponential Kernel
int main | ( | int | argc, |
char * | argv[] | ||
) |
------------————— Main Code Starts Here ---------—————
tst=1: Test Kernels for Liza's data sets
tst=2: Test Kernels for Random point clouds
tst=3: Test Product of two Random matrices
tst=4: Test Full matrices
void set_option_from_command_line | ( | int | argc, |
const char *const * | cargv, | ||
F2Cptr | option0 | ||
) |
The command line parser for the example related parameters
vector<T> write_from_file | ( | string | filename | ) |
Read a data file into a vector
const double pi = 4.0 * atan(1.0) |