GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | 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.

Macros

#define CONV_DEFS(TPREF, RPREF)
 
#define FORWARD_IMPL(T_CXX, R_CXX, T, R, T_CAST, T_CONST_CAST,R_CONST_CAST, f, F)
 

Functions

NDArray convn (const NDArray &a, const NDArray &b, convn_type ct)
 
Matrix convn (const Matrix &a, const Matrix &b, convn_type ct)
 
Matrix convn (const Matrix &a, const ColumnVector &c, const RowVector &r, convn_type ct)
 
ComplexNDArray convn (const ComplexNDArray &a, const NDArray &b, convn_type ct)
 
ComplexMatrix convn (const ComplexMatrix &a, const Matrix &b, convn_type ct)
 
ComplexMatrix convn (const ComplexMatrix &a, const ColumnVector &c, const RowVector &r, convn_type ct)
 
ComplexNDArray convn (const ComplexNDArray &a, const ComplexNDArray &b, convn_type ct)
 
ComplexMatrix convn (const ComplexMatrix &a, const ComplexMatrix &b, convn_type ct)
 
ComplexMatrix convn (const ComplexMatrix &a, const ComplexColumnVector &c, const ComplexRowVector &r, convn_type ct)
 
FloatMatrix convn (const FloatMatrix &a, const FloatColumnVector &c, const FloatRowVector &r, convn_type ct)
 
FloatNDArray convn (const FloatNDArray &a, const FloatNDArray &b, convn_type ct)
 
FloatMatrix convn (const FloatMatrix &a, const FloatMatrix &b, convn_type ct)
 
FloatComplexNDArray convn (const FloatComplexNDArray &a, const FloatNDArray &b, convn_type ct)
 
FloatComplexMatrix convn (const FloatComplexMatrix &a, const FloatMatrix &b, convn_type ct)
 
FloatComplexMatrix convn (const FloatComplexMatrix &a, const FloatColumnVector &c, const FloatRowVector &r, convn_type ct)
 
FloatComplexNDArray convn (const FloatComplexNDArray &a, const FloatComplexNDArray &b, convn_type ct)
 
FloatComplexMatrix convn (const FloatComplexMatrix &a, const FloatComplexMatrix &b, convn_type ct)
 
FloatComplexMatrix convn (const FloatComplexMatrix &a, const FloatComplexColumnVector &c, const FloatComplexRowVector &r, convn_type ct)
 
template<typename T , typename R >
static MArray< T > convolve (const MArray< T > &a, const MArray< R > &b, convn_type ct)
 
template<typename T , typename 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<>
F77_RET_T const F77_INT const
F77_DBLE const F77_INT const
F77_INT const F77_DBLE
F77_DBLE *C F77_RET_T const
F77_INT const F77_DBLE const
F77_INT const F77_INT const
F77_DBLE F77_DBLE *void 
convolve_2d< double, double > (const double *a, F77_INT ma, F77_INT na, const double *b, F77_INT mb, F77_INT nb, double *c, bool inner)
 
template<>
F77_RET_T const F77_INT const
F77_REAL const F77_INT const
F77_INT const F77_REAL
F77_REAL *C F77_RET_T const
F77_INT const F77_REAL const
F77_INT const F77_INT const
F77_REAL F77_REAL *void 
convolve_2d< float, float > (const float *a, F77_INT ma, F77_INT na, const float *b, F77_INT mb, F77_INT nb, float *c, bool inner)
 
template<>
F77_RET_T const F77_INT const
F77_DBLE_CMPLX const F77_INT
const F77_INT const F77_DBLE
F77_DBLE_CMPLX *C F77_RET_T
const F77_INT const
F77_DBLE_CMPLX const F77_INT
const F77_INT const F77_DBLE
F77_DBLE_CMPLX *void 
convolve_2d< std::complex< double >, double > (const std::complex< double > *a, F77_INT ma, F77_INT na, const double *b, F77_INT mb, F77_INT nb, std::complex< double > *c, bool inner)
 
template<>
F77_RET_T const F77_INT const
F77_CMPLX const F77_INT const
F77_INT const F77_REAL
F77_CMPLX *C F77_RET_T const
F77_INT const F77_CMPLX const
F77_INT const F77_INT const
F77_REAL F77_CMPLX *void 
convolve_2d< std::complex< float >, float > (const std::complex< float > *a, F77_INT ma, F77_INT na, const float *b, F77_INT mb, F77_INT nb, std::complex< float > *c, bool inner)
 
template<typename T , typename 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)
 
F77_RET_T F77_FUNC (dconv2o, DCONV2O)(const F77_INT &
 
F77_RET_T const F77_INT const
F77_DBLE const F77_INT const
F77_INT const F77_DBLE
F77_DBLE *C F77_RET_T 
F77_FUNC (dconv2i, DCONV2I)(const F77_INT &
 
F77_RET_T F77_FUNC (sconv2o, SCONV2O)(const F77_INT &
 
F77_RET_T const F77_INT const
F77_REAL const F77_INT const
F77_INT const F77_REAL
F77_REAL *C F77_RET_T 
F77_FUNC (sconv2i, SCONV2I)(const F77_INT &
 
F77_RET_T const F77_INT const
F77_DBLE_CMPLX const F77_INT
const F77_INT const
F77_DBLE_CMPLX F77_DBLE_CMPLX
*C F77_RET_T 
F77_FUNC (zconv2i, ZCONV2I)(const F77_INT &
 
F77_RET_T F77_FUNC (zconv2o, ZCONV2O)(const F77_INT &
 
F77_RET_T const F77_INT const
F77_CMPLX const F77_INT const
F77_INT const F77_CMPLX
F77_CMPLX *C F77_RET_T 
F77_FUNC (cconv2i, CCONV2I)(const F77_INT &
 
F77_RET_T F77_FUNC (cconv2o, CCONV2O)(const F77_INT &
 
F77_RET_T const F77_INT const
F77_DBLE_CMPLX const F77_INT
const F77_INT const F77_DBLE
F77_DBLE_CMPLX *C F77_RET_T 
F77_FUNC (zdconv2i, ZDCONV2I)(const F77_INT &
 
F77_RET_T F77_FUNC (zdconv2o, ZDCONV2O)(const F77_INT &
 
F77_RET_T const F77_INT const
F77_CMPLX const F77_INT const
F77_INT const F77_REAL
F77_CMPLX *C F77_RET_T 
F77_FUNC (csconv2i, CSCONV2I)(const F77_INT &
 
F77_RET_T F77_FUNC (csconv2o, CSCONV2O)(const F77_INT &
 

Macro Definition 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); \
}
static MArray< T > convolve(const MArray< T > &a, const MArray< R > &b, convn_type ct)
Definition: oct-convn.cc:126
convn_type
Definition: oct-convn.h:49
NDArray convn(const NDArray &a, const NDArray &b, convn_type ct)
Definition: oct-convn.cc:187
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
Definition: dMatrix.h:37
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
b
Definition: cellfun.cc:398

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

#define FORWARD_IMPL (   T_CXX,
  R_CXX,
  T,
  R,
  T_CAST,
  T_CONST_CAST,
  R_CONST_CAST,
  f,
  F 
)
Value:
extern "C" \
F77_FUNC (f##conv2o, F##CONV2O) (const F77_INT&, \
const F77_INT&, \
const T*, const F77_INT&, \
const F77_INT&, const R*, T *); \
\
extern "C" \
F77_FUNC (f##conv2i, F##CONV2I) (const F77_INT&, \
const F77_INT&, \
const T*, const F77_INT&, \
const F77_INT&, const R*, T *); \
\
template <> void \
convolve_2d<T_CXX, R_CXX> (const T_CXX *a, F77_INT ma, F77_INT na, \
const R_CXX *b, F77_INT mb, F77_INT nb, \
T_CXX *c, bool inner) \
{ \
if (inner) \
F77_XFCN (f##conv2i, F##CONV2I, (ma, na, T_CONST_CAST (a), \
mb, nb, R_CONST_CAST (b), \
T_CAST (c))); \
F77_XFCN (f##conv2o, F##CONV2O, (ma, na, T_CONST_CAST (a), \
mb, nb, R_CONST_CAST (b), \
T_CAST (c))); \
}
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE * f
#define F77_XFCN(f, F, args)
Definition: f77-fcn.h:52
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
if(nargin< 2) print_usage()
Definition: cellfun.cc:405
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
#define F77_INT
Definition: f77-fcn.h:335
b
Definition: cellfun.cc:398
F77_RET_T F77_FUNC(dconv2o, DCONV2O)(const F77_INT &
void F(const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n)
Definition: mx-inlines.cc:719

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

Function Documentation

NDArray convn ( const NDArray a,
const NDArray b,
convn_type  ct 
)

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

Referenced by Fconv2().

Matrix convn ( const Matrix a,
const Matrix b,
convn_type  ct 
)

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

Matrix convn ( const Matrix a,
const ColumnVector c,
const RowVector r,
convn_type  ct 
)

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

ComplexNDArray convn ( const ComplexNDArray a,
const NDArray b,
convn_type  ct 
)

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

ComplexMatrix convn ( const ComplexMatrix a,
const Matrix b,
convn_type  ct 
)

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

ComplexMatrix convn ( const ComplexMatrix a,
const ColumnVector c,
const RowVector r,
convn_type  ct 
)

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

ComplexNDArray convn ( const ComplexNDArray a,
const ComplexNDArray b,
convn_type  ct 
)

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

ComplexMatrix convn ( const ComplexMatrix a,
const ComplexMatrix b,
convn_type  ct 
)

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

ComplexMatrix convn ( const ComplexMatrix a,
const ComplexColumnVector c,
const ComplexRowVector r,
convn_type  ct 
)

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

FloatMatrix convn ( const FloatMatrix a,
const FloatColumnVector c,
const FloatRowVector r,
convn_type  ct 
)

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

FloatNDArray convn ( const FloatNDArray a,
const FloatNDArray b,
convn_type  ct 
)

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

FloatMatrix convn ( const FloatMatrix a,
const FloatMatrix b,
convn_type  ct 
)

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

FloatComplexNDArray convn ( const FloatComplexNDArray a,
const FloatNDArray b,
convn_type  ct 
)

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

FloatComplexMatrix convn ( const FloatComplexMatrix a,
const FloatMatrix b,
convn_type  ct 
)

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

FloatComplexMatrix convn ( const FloatComplexMatrix a,
const FloatColumnVector c,
const FloatRowVector r,
convn_type  ct 
)

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

FloatComplexNDArray convn ( const FloatComplexNDArray a,
const FloatComplexNDArray b,
convn_type  ct 
)

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

FloatComplexMatrix convn ( const FloatComplexMatrix a,
const FloatComplexMatrix b,
convn_type  ct 
)

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

FloatComplexMatrix convn ( const FloatComplexMatrix a,
const FloatComplexColumnVector c,
const FloatComplexRowVector r,
convn_type  ct 
)

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

template<typename T , typename R >
static MArray<T> convolve ( const MArray< T > &  a,
const MArray< R > &  b,
convn_type  ct 
)
static
template<typename T , typename 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<>
F77_RET_T const F77_INT const F77_DBLE const F77_INT const F77_INT const F77_DBLE F77_DBLE* C F77_RET_T const F77_INT const F77_DBLE const F77_INT const F77_INT const F77_DBLE F77_DBLE* void convolve_2d< double, double > ( const double a,
F77_INT  ma,
F77_INT  na,
const double b,
F77_INT  mb,
F77_INT  nb,
double c,
bool  inner 
)

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

template<>
F77_RET_T const F77_INT const F77_REAL const F77_INT const F77_INT const F77_REAL F77_REAL* C F77_RET_T const F77_INT const F77_REAL const F77_INT const F77_INT const F77_REAL F77_REAL* void convolve_2d< float, float > ( const float *  a,
F77_INT  ma,
F77_INT  na,
const float *  b,
F77_INT  mb,
F77_INT  nb,
float *  c,
bool  inner 
)

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

template<>
F77_RET_T const F77_INT const F77_DBLE_CMPLX const F77_INT const F77_INT const F77_DBLE F77_DBLE_CMPLX* C F77_RET_T const F77_INT const F77_DBLE_CMPLX const F77_INT const F77_INT const F77_DBLE F77_DBLE_CMPLX* void convolve_2d< std::complex< double >, double > ( const std::complex< double > *  a,
F77_INT  ma,
F77_INT  na,
const double b,
F77_INT  mb,
F77_INT  nb,
std::complex< double > *  c,
bool  inner 
)

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

template<>
F77_RET_T const F77_INT const F77_CMPLX const F77_INT const F77_INT const F77_REAL F77_CMPLX* C F77_RET_T const F77_INT const F77_CMPLX const F77_INT const F77_INT const F77_REAL F77_CMPLX* void convolve_2d< std::complex< float >, float > ( const std::complex< float > *  a,
F77_INT  ma,
F77_INT  na,
const float *  b,
F77_INT  mb,
F77_INT  nb,
std::complex< float > *  c,
bool  inner 
)

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

template<typename T , typename 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 91 of file oct-convn.cc.

References a, b, and c.

F77_RET_T F77_FUNC ( dconv2o  ,
DCONV2O   
) const
F77_RET_T const F77_INT const F77_DBLE const F77_INT const F77_INT const F77_DBLE F77_DBLE* C F77_RET_T F77_FUNC ( dconv2i  ,
DCONV2I   
) const
F77_RET_T F77_FUNC ( sconv2o  ,
SCONV2O   
) const
F77_RET_T const F77_INT const F77_REAL const F77_INT const F77_INT const F77_REAL F77_REAL* C F77_RET_T F77_FUNC ( sconv2i  ,
SCONV2I   
) const
F77_RET_T const F77_INT const F77_DBLE_CMPLX const F77_INT const F77_INT const F77_DBLE_CMPLX F77_DBLE_CMPLX* C F77_RET_T F77_FUNC ( zconv2i  ,
ZCONV2I   
) const
F77_RET_T F77_FUNC ( zconv2o  ,
ZCONV2O   
) const
F77_RET_T const F77_INT const F77_CMPLX const F77_INT const F77_INT const F77_CMPLX F77_CMPLX* C F77_RET_T F77_FUNC ( cconv2i  ,
CCONV2I   
) const
F77_RET_T F77_FUNC ( cconv2o  ,
CCONV2O   
) const
F77_RET_T const F77_INT const F77_DBLE_CMPLX const F77_INT const F77_INT const F77_DBLE F77_DBLE_CMPLX* C F77_RET_T F77_FUNC ( zdconv2i  ,
ZDCONV2I   
) const
F77_RET_T F77_FUNC ( zdconv2o  ,
ZDCONV2O   
) const
F77_RET_T const F77_INT const F77_CMPLX const F77_INT const F77_INT const F77_REAL F77_CMPLX* C F77_RET_T F77_FUNC ( csconv2i  ,
CSCONV2I   
) const
F77_RET_T F77_FUNC ( csconv2o  ,
CSCONV2O   
) const