(git:0a7030e)
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 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 137 of file grid_dgemm_utils.h.

◆ CBLAS_TRANSPOSE

Definition at line 138 of file grid_dgemm_utils.h.

◆ CBLAS_UPLO

typedef enum CBLAS_UPLO CBLAS_UPLO

Definition at line 139 of file grid_dgemm_utils.h.

◆ CBLAS_DIAG

typedef enum CBLAS_DIAG CBLAS_DIAG

Definition at line 140 of file grid_dgemm_utils.h.

Enumeration Type Documentation

◆ CBLAS_LAYOUT

Enumerator
CblasRowMajor 
CblasColMajor 

Definition at line 127 of file grid_dgemm_utils.h.

◆ CBLAS_TRANSPOSE

Enumerator
CblasNoTrans 
CblasTrans 
CblasConjTrans 

Definition at line 128 of file grid_dgemm_utils.h.

◆ CBLAS_UPLO

enum CBLAS_UPLO
Enumerator
CblasUpper 
CblasLower 

Definition at line 133 of file grid_dgemm_utils.h.

◆ CBLAS_DIAG

enum CBLAS_DIAG
Enumerator
CblasNonUnit 
CblasUnit 

Definition at line 134 of file grid_dgemm_utils.h.

◆ CBLAS_SIDE

enum CBLAS_SIDE
Enumerator
CblasLeft 
CblasRight 

Definition at line 135 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 57 of file grid_dgemm_utils.h.

◆ dgemm_simplified()

void dgemm_simplified ( dgemm_params *const m)
extern

Definition at line 41 of file grid_dgemm_utils.c.

Here is the call graph for this function:
Here is the caller 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 97 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 130 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 261 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 270 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 168 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 108 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 115 of file grid_dgemm_utils.h.

Here is the call graph for this function:

◆ grid_allocate_scratch()

void * grid_allocate_scratch ( size_t size)
inlinestatic

Definition at line 121 of file grid_dgemm_utils.h.

Here is the caller graph for this function:

◆ grid_free_scratch()

void grid_free_scratch ( void * ptr)
inlinestatic

Definition at line 123 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 329 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 366 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 304 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 378 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 399 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 25 of file grid_dgemm_utils.h.