#ifndef ULMAUX_H
#define ULMAUX_H
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
double
walltime();
void
randDGeMatrix(size_t m, size_t n, bool withNan,
double *A,
ptrdiff_t incRowA, ptrdiff_t incColA);
void
printfDGeMatrix(const char * fmt, size_t m, size_t n,
const double *A,
ptrdiff_t incRowA, ptrdiff_t incColA);
void
printDGeMatrix(size_t m, size_t n,
const double *A,
ptrdiff_t incRowA, ptrdiff_t incColA);
void
printIGeMatrix(size_t m, size_t n,
const size_t *A,
ptrdiff_t incRowA, ptrdiff_t incColA);
inline size_t
ptrdiff_abs(ptrdiff_t x)
{
return x>0 ? x : -x;
}
void
dfill_nan(size_t bufsize, double *buf);
void
ifill_rand(size_t bufsize, size_t *buf);
void
dgecopy(size_t m, size_t n,
const double *A, ptrdiff_t incRowA, ptrdiff_t incColA,
double *B, ptrdiff_t incRowB, ptrdiff_t incColB);
void
dgeaxpy(size_t m, size_t n, double alpha,
const double *X, ptrdiff_t incRowX, ptrdiff_t incColX,
double *Y, ptrdiff_t incRowY, ptrdiff_t incColY);
double
dgenrm_inf(size_t m, size_t n,
const double *A,
ptrdiff_t incRowA, ptrdiff_t incColA);
#endif