Defines | Functions

oct-convn.cc File Reference

#include <iostream>
#include <algorithm>
#include "f77-fcn.h"
#include "oct-convn.h"
#include "oct-locbuf.h"
Include dependency graph for oct-convn.cc:

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 Documentation

#define CONV_DEFS (   TPREF,
  RPREF 
)
Value:
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 
)
Value:
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.


Function Documentation

template<class T , class R >
static MArray<T> convolve ( const MArray< T > &  a,
const MArray< R > &  b,
convn_type  ct 
) [static]
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 
) [static]
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 
)

Definition at line 77 of file oct-convn.cc.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines