(git:374b731)
|
#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. | |
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.
|
inlinestatic |
Private convenient wrapper to hide Fortran nature of dgemm_.
Definition at line 39 of file dbm_multiply_cpu.c.
|
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.
Definition at line 57 of file dbm_multiply_cpu.c.
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.
Definition at line 68 of file dbm_multiply_cpu.c.