(git:374b731)
Loading...
Searching...
No Matches
dbm_multiply_cpu.c File Reference
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include "dbm_hyperparams.h"
#include "dbm_multiply_cpu.h"

Go to the source code of this file.

Functions

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.
 
static void dbm_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)
 Private convenient wrapper to hide Fortran nature of dgemm_.
 
static unsigned int hash (const dbm_task_t task)
 Private hash function based on Szudzik's elegant pairing. Using unsigned int to return a positive number even after overflow. https://en.wikipedia.org/wiki/Pairing_function#Other_pairing_functions https://stackoverflow.com/a/13871379 http://szudzik.com/ElegantPairing.pdf.
 
void dbm_multiply_cpu_process_batch (const int ntasks, dbm_task_t batch[ntasks], const double alpha, const dbm_pack_t *pack_a, const dbm_pack_t *pack_b, dbm_shard_t *shard_c)
 Internal routine for executing the tasks in given batch on the CPU.
 

Function Documentation

◆ 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
Here is the caller graph for this function:

◆ dbm_dgemm()

static void dbm_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 
)
inlinestatic

Private convenient wrapper to hide Fortran nature of dgemm_.

Author
Ole Schuett

Definition at line 39 of file dbm_multiply_cpu.c.

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

◆ hash()

static unsigned int hash ( const dbm_task_t  task)
inlinestatic

Private hash function based on Szudzik's elegant pairing. Using unsigned int to return a positive number even after overflow. https://en.wikipedia.org/wiki/Pairing_function#Other_pairing_functions https://stackoverflow.com/a/13871379 http://szudzik.com/ElegantPairing.pdf.

Author
Ole Schuett

Definition at line 57 of file dbm_multiply_cpu.c.

Here is the caller graph for this function:

◆ dbm_multiply_cpu_process_batch()

void dbm_multiply_cpu_process_batch ( const int  ntasks,
dbm_task_t  batch[ntasks],
const double  alpha,
const dbm_pack_t pack_a,
const dbm_pack_t pack_b,
dbm_shard_t shard_c 
)

Internal routine for executing the tasks in given batch on the CPU.

Author
Ole Schuett

Definition at line 68 of file dbm_multiply_cpu.c.

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