30 ~ProcMatrix()
override {}
32 void configure(ConfIterator iter,
unsigned int n)
override;
33 void eval(ValueIterator iter,
unsigned int n)
const override;
34 std::vector<double> deriv(ValueIterator iter,
unsigned int n)
const override;
42 inline unsigned int getRows()
const {
return rows; }
43 inline unsigned int getCols()
const {
return cols; }
45 inline double operator()(
unsigned int row,
unsigned int col)
const {
return coeffs[row * cols +
col]; }
50 std::vector<double> coeffs;
61 void ProcMatrix::configure(ConfIterator iter,
unsigned int n) {
66 iter++(Variable::FLAG_NONE);
68 for (
unsigned int row = 0; row <
matrix.getRows(); row++)
69 iter << Variable::FLAG_NONE;
72 void ProcMatrix::eval(ValueIterator iter,
unsigned int n)
const {
73 double *sums = (
double *)alloca(
matrix.getRows() *
sizeof(double));
74 for (
unsigned int row = 0; row <
matrix.getRows(); row++)
79 for (
unsigned int row = 0; row <
matrix.getRows(); row++)
83 for (
unsigned int row = 0; row <
matrix.getRows(); row++)
87 std::vector<double> ProcMatrix::deriv(ValueIterator iter,
unsigned int n)
const {
88 std::vector<double>
result;
91 for (
unsigned int row = 0; row <
matrix.getRows(); row++)
portabletest::Matrix Matrix