20 template<
typename T1,
typename T2>
27 typedef typename T1::elem_type eT;
44 const uword out_n_elem = h_n_elem + x_n_elem - 1;
47 if( (h_n_elem == 0) || (x_n_elem == 0) )
57 const eT* h_mem = h.memptr();
58 const eT* x_mem = x.
memptr();
59 eT* out_mem = out.
memptr();
62 for(
uword out_i = 0; out_i < (h_n_elem-1); ++out_i)
68 for(
uword x_i = 0; x_i <= out_i; ++x_i, --h_i)
70 acc += h_mem[h_i] * x_mem[x_i];
77 for(
uword out_i = h_n_elem-1; out_i < out_n_elem - (h_n_elem-1); ++out_i)
81 uword h_i = h_n_elem - 1;
83 for(
uword x_i = out_i - h_n_elem + 1; x_i <= out_i; ++x_i, --h_i)
85 acc += h_mem[h_i] * x_mem[x_i];
92 for(
uword out_i = out_n_elem - (h_n_elem-1); out_i < out_n_elem; ++out_i)
96 uword h_i = h_n_elem - 1;
98 for(
uword x_i = out_i - h_n_elem + 1; x_i < x_n_elem; ++x_i, --h_i)
100 acc += h_mem[h_i] * x_mem[x_i];
103 out_mem[out_i] = acc;
arma_inline arma_warn_unused bool is_vec() const
returns true if the object can be interpreted as a column or row vector
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
void set_size(const uword in_elem)
change the matrix to have user specified dimensions (data is not preserved)
const uword n_cols
number of columns in the matrix (read-only)
const uword n_elem
number of elements in the matrix (read-only)
const T1 & A
first operand
static void apply(Mat< typename T1::elem_type > &out, const Glue< T1, T2, glue_conv > &X)
rudimentary implementation of the convolution operation
const T2 & B
second operand
#define arma_extra_debug_sigprint