5 #ifndef FML_CPU_FUTURE_DIAG_H
6 #define FML_CPU_FUTURE_DIAG_H
13 #include "../cpumat.hh"
14 #include "../cpuvec.hh"
19 template <
typename REAL>
20 bool is_diag(
const cpumat<REAL> &x)
25 const len_t m = x.nrows();
27 for (len_t j=0; j<x.ncols(); j++)
29 for (len_t i=0; i<m; i++)
34 if (fabs(x_d[i + m*j]) > (REAL)0.0)
43 template <
typename REAL>
44 void make_diag(cpumat<REAL> &x,
const cpuvec<REAL> &v)