#include <iostream>
#include <algorithm>
#include "f77-fcn.h"
#include "oct-convn.h"
#include "oct-locbuf.h"
Go to the source code of this file.
Defines | |
#define | CONV_DEFS(TPREF, RPREF) |
#define | FORWARD_IMPL(T, R, f, F) |
Functions | |
template<class T , class R > | |
static MArray< T > | convolve (const MArray< T > &a, const MArray< R > &b, convn_type ct) |
template<class T , class R > | |
static void | convolve_2d (const T *a, octave_idx_type ma, octave_idx_type na, const R *b, octave_idx_type mb, octave_idx_type nb, T *c, bool inner) |
template<class T , class R > | |
void | convolve_nd (const T *a, const dim_vector &ad, const dim_vector &acd, const R *b, const dim_vector &bd, const dim_vector &bcd, T *c, const dim_vector &ccd, int nd, bool inner) |
#define CONV_DEFS | ( | TPREF, | ||
RPREF | ||||
) |
TPREF ## NDArray \ convn (const TPREF ## NDArray& a, const RPREF ## NDArray& b, convn_type ct) \ { \ return convolve (a, b, ct); \ } \ TPREF ## Matrix \ convn (const TPREF ## Matrix& a, const RPREF ## Matrix& b, convn_type ct) \ { \ return convolve (a, b, ct); \ } \ TPREF ## Matrix \ convn (const TPREF ## Matrix& a, const RPREF ## ColumnVector& c, \ const RPREF ## RowVector& r, convn_type ct) \ { \ return convolve (a, c * r, ct); \ }
Definition at line 147 of file oct-convn.cc.
#define FORWARD_IMPL | ( | T, | ||
R, | ||||
f, | ||||
F | ||||
) |
extern "C" \ F77_RET_T \ F77_FUNC (f##conv2o, F##CONV2O) (const octave_idx_type&, \ const octave_idx_type&, \ const T*, const octave_idx_type&, \ const octave_idx_type&, const R*, T *); \ \ extern "C" \ F77_RET_T \ F77_FUNC (f##conv2i, F##CONV2I) (const octave_idx_type&, \ const octave_idx_type&, \ const T*, const octave_idx_type&, \ const octave_idx_type&, const R*, T *); \ \ template <> void \ convolve_2d<T, R> (const T *a, octave_idx_type ma, octave_idx_type na, \ const R *b, octave_idx_type mb, octave_idx_type nb, \ T *c, bool inner) \ { \ if (inner) \ F77_XFCN (f##conv2i, F##CONV2I, (ma, na, a, mb, nb, b, c)); \ else \ F77_XFCN (f##conv2o, F##CONV2O, (ma, na, a, mb, nb, b, c)); \ }
Definition at line 43 of file oct-convn.cc.
static MArray<T> convolve | ( | const MArray< T > & | a, | |
const MArray< R > & | b, | |||
convn_type | ct | |||
) | [static] |
Definition at line 108 of file oct-convn.cc.
References dim_vector::alloc(), convn_same, convn_valid, dim_vector::cumulative(), Array< T >::dims(), Array< T >::fortran_vec(), Array< T >::index(), Array< T >::is_empty(), idx_vector::make_range(), max(), Array< T >::ndims(), and dim_vector::redim().
static void convolve_2d | ( | const T * | a, | |
octave_idx_type | ma, | |||
octave_idx_type | na, | |||
const R * | b, | |||
octave_idx_type | mb, | |||
octave_idx_type | nb, | |||
T * | c, | |||
bool | inner | |||
) | [static] |
void convolve_nd | ( | const T * | a, | |
const dim_vector & | ad, | |||
const dim_vector & | acd, | |||
const R * | b, | |||
const dim_vector & | bd, | |||
const dim_vector & | bcd, | |||
T * | c, | |||
const dim_vector & | ccd, | |||
int | nd, | |||
bool | inner | |||
) |
Definition at line 77 of file oct-convn.cc.