(git:374b731)
Loading...
Searching...
No Matches
grid_dgemm_utils.h File Reference
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "../common/grid_common.h"
#include "grid_dgemm_private_header.h"
#include "grid_dgemm_tensor_local.h"

Go to the source code of this file.

Data Structures

struct  dgemm_params_
 

Typedefs

typedef struct dgemm_params_ dgemm_params
 
typedef enum CBLAS_LAYOUT CBLAS_LAYOUT
 
typedef enum CBLAS_TRANSPOSE CBLAS_TRANSPOSE
 
typedef enum CBLAS_UPLO CBLAS_UPLO
 
typedef enum CBLAS_DIAG CBLAS_DIAG
 

Enumerations

enum  CBLAS_LAYOUT { CblasRowMajor = 101 , CblasColMajor = 102 }
 
enum  CBLAS_TRANSPOSE { CblasNoTrans = 111 , CblasTrans = 112 , CblasConjTrans = 113 }
 
enum  CBLAS_UPLO { CblasUpper = 121 , CblasLower = 122 }
 
enum  CBLAS_DIAG { CblasNonUnit = 131 , CblasUnit = 132 }
 
enum  CBLAS_SIDE { CblasLeft = 141 , CblasRight = 142 }
 

Functions

int coset_without_offset (int lx, int ly, int lz)
 
void dgemm_simplified (dgemm_params *const m)
 
void batched_dgemm_simplified (dgemm_params *const m, const int batch_size)
 
void dgemm_ (const char *transa, const char *transb, const int *m, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc)
 Prototype for BLAS dgemm.
 
void extract_sub_grid (const int *lower_corner, const int *upper_corner, const int *position, const tensor *const grid, tensor *const subgrid)
 
void add_sub_grid (const int *lower_corner, const int *upper_corner, const int *position, const tensor *subgrid, tensor *grid)
 
void return_cube_position (const int *lb_grid, const int *cube_center, const int *lower_boundaries_cube, const int *period, int *const position)
 
void verify_orthogonality (const double dh[3][3], bool orthogonal[3])
 
int compute_cube_properties (const bool ortho, const double radius, const double dh[3][3], const double dh_inv[3][3], const double *rp, double *disr_radius, double *roffset, int *cubecenter, int *lb_cube, int *ub_cube, int *cube_size)
 
int return_offset_l (const int l)
 
int return_linear_index_from_exponents (const int alpha, const int beta, const int gamma)
 
static void * grid_allocate_scratch (size_t size)
 
static void grid_free_scratch (void *ptr)
 
double cblas_ddot (const int N, const double *X, const int incX, const double *Y, const int incY)
 
void cblas_dger (const CBLAS_LAYOUT Layout, const int M, const int N, const double alpha, const double *X, const int incX, const double *Y, const int incY, double *A, const int lda)
 
void cblas_daxpy (const int N, const double alpha, const double *X, const int incX, double *Y, const int incY)
 
void cblas_dgemv (const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)
 
void compute_interval (const int *const map, const int full_size, const int size, const int cube_size, const int x1, int *x, int *const lower_corner, int *const upper_corner, Interval window)
 

Variables

static const double inv_fac []
 

Typedef Documentation

◆ dgemm_params

typedef struct dgemm_params_ dgemm_params

◆ CBLAS_LAYOUT

typedef enum CBLAS_LAYOUT CBLAS_LAYOUT

Definition at line 161 of file grid_dgemm_utils.h.

◆ CBLAS_TRANSPOSE

Definition at line 162 of file grid_dgemm_utils.h.

◆ CBLAS_UPLO

typedef enum CBLAS_UPLO CBLAS_UPLO

Definition at line 163 of file grid_dgemm_utils.h.

◆ CBLAS_DIAG

typedef enum CBLAS_DIAG CBLAS_DIAG

Definition at line 164 of file grid_dgemm_utils.h.

Enumeration Type Documentation

◆ CBLAS_LAYOUT

Enumerator
CblasRowMajor 
CblasColMajor 

Definition at line 151 of file grid_dgemm_utils.h.

◆ CBLAS_TRANSPOSE

Enumerator
CblasNoTrans 
CblasTrans 
CblasConjTrans 

Definition at line 152 of file grid_dgemm_utils.h.

◆ CBLAS_UPLO

enum CBLAS_UPLO
Enumerator
CblasUpper 
CblasLower 

Definition at line 157 of file grid_dgemm_utils.h.

◆ CBLAS_DIAG

enum CBLAS_DIAG
Enumerator
CblasNonUnit 
CblasUnit 

Definition at line 158 of file grid_dgemm_utils.h.

◆ CBLAS_SIDE

enum CBLAS_SIDE
Enumerator
CblasLeft 
CblasRight 

Definition at line 159 of file grid_dgemm_utils.h.

Function Documentation

◆ coset_without_offset()

int coset_without_offset ( int  lx,
int  ly,
int  lz 
)
inline

Definition at line 61 of file grid_dgemm_utils.h.

◆ dgemm_simplified()

void dgemm_simplified ( dgemm_params *const  m)
extern

Definition at line 40 of file grid_dgemm_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ batched_dgemm_simplified()

void batched_dgemm_simplified ( dgemm_params *const  m,
const int  batch_size 
)
extern

Definition at line 109 of file grid_dgemm_utils.c.

Here is the call graph for this function:

◆ dgemm_()

void dgemm_ ( const char *  transa,
const char *  transb,
const int *  m,
const int *  n,
const int *  k,
const double *  alpha,
const double *  a,
const int *  lda,
const double *  b,
const int *  ldb,
const double *  beta,
double *  c,
const int *  ldc 
)

Prototype for BLAS dgemm.

Author
Ole Schuett

◆ extract_sub_grid()

void extract_sub_grid ( const int *  lower_corner,
const int *  upper_corner,
const int *  position,
const tensor *const  grid,
tensor *const  subgrid 
)
extern

Definition at line 187 of file grid_dgemm_utils.c.

Here is the caller graph for this function:

◆ add_sub_grid()

void add_sub_grid ( const int *  lower_corner,
const int *  upper_corner,
const int *  position,
const tensor subgrid,
tensor grid 
)
extern

Definition at line 226 of file grid_dgemm_utils.c.

Here is the caller graph for this function:

◆ return_cube_position()

void return_cube_position ( const int *  lb_grid,
const int *  cube_center,
const int *  lower_boundaries_cube,
const int *  period,
int *const  position 
)
extern

Definition at line 363 of file grid_dgemm_utils.c.

Here is the call graph for this function:

◆ verify_orthogonality()

void verify_orthogonality ( const double  dh[3][3],
bool  orthogonal[3] 
)
extern

Definition at line 372 of file grid_dgemm_utils.c.

Here is the caller graph for this function:

◆ compute_cube_properties()

int compute_cube_properties ( const bool  ortho,
const double  radius,
const double  dh[3][3],
const double  dh_inv[3][3],
const double *  rp,
double *  disr_radius,
double *  roffset,
int *  cubecenter,
int *  lb_cube,
int *  ub_cube,
int *  cube_size 
)
extern

Definition at line 270 of file grid_dgemm_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ return_offset_l()

int return_offset_l ( const int  l)
inline

Definition at line 120 of file grid_dgemm_utils.h.

Here is the caller graph for this function:

◆ return_linear_index_from_exponents()

int return_linear_index_from_exponents ( const int  alpha,
const int  beta,
const int  gamma 
)
inline

Definition at line 127 of file grid_dgemm_utils.h.

Here is the call graph for this function:

◆ grid_allocate_scratch()

static void * grid_allocate_scratch ( size_t  size)
inlinestatic

Definition at line 133 of file grid_dgemm_utils.h.

Here is the caller graph for this function:

◆ grid_free_scratch()

static void grid_free_scratch ( void *  ptr)
inlinestatic

Definition at line 141 of file grid_dgemm_utils.h.

Here is the caller graph for this function:

◆ cblas_ddot()

double cblas_ddot ( const int  N,
const double *  X,
const int  incX,
const double *  Y,
const int  incY 
)

Definition at line 431 of file grid_dgemm_utils.c.

Here is the caller graph for this function:

◆ cblas_dger()

void cblas_dger ( const CBLAS_LAYOUT  Layout,
const int  M,
const int  N,
const double  alpha,
const double *  X,
const int  incX,
const double *  Y,
const int  incY,
double *  A,
const int  lda 
)

Definition at line 468 of file grid_dgemm_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cblas_daxpy()

void cblas_daxpy ( const int  N,
const double  alpha,
const double *  X,
const int  incX,
double *  Y,
const int  incY 
)

Definition at line 406 of file grid_dgemm_utils.c.

Here is the caller graph for this function:

◆ cblas_dgemv()

void cblas_dgemv ( const CBLAS_LAYOUT  Layout,
const CBLAS_TRANSPOSE  TransA,
const int  M,
const int  N,
const double  alpha,
const double *  A,
const int  lda,
const double *  X,
const int  incX,
const double  beta,
double *  Y,
const int  incY 
)

Definition at line 480 of file grid_dgemm_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_interval()

void compute_interval ( const int *const  map,
const int  full_size,
const int  size,
const int  cube_size,
const int  x1,
int *  x,
int *const  lower_corner,
int *const  upper_corner,
Interval  window 
)
extern

Definition at line 501 of file grid_dgemm_utils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ inv_fac

const double inv_fac[]
static

Definition at line 29 of file grid_dgemm_utils.h.