GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
dot.cc File Reference
#include "lo-blas-proto.h"
#include "mx-base.h"
#include "error.h"
#include "defun.h"
#include "parse.h"
Include dependency graph for dot.cc:

Go to the source code of this file.

Functions

template<>
void blkmm_internal (const FloatComplexNDArray &x, const FloatComplexNDArray &y, FloatComplexNDArray &z, F77_INT m, F77_INT n, F77_INT k, F77_INT np)
 
template<>
void blkmm_internal (const ComplexNDArray &x, const ComplexNDArray &y, ComplexNDArray &z, F77_INT m, F77_INT n, F77_INT k, F77_INT np)
 
template<>
void blkmm_internal (const FloatNDArray &x, const FloatNDArray &y, FloatNDArray &z, F77_INT m, F77_INT n, F77_INT k, F77_INT np)
 
template<>
void blkmm_internal (const NDArray &x, const NDArray &y, NDArray &z, F77_INT m, F77_INT n, F77_INT k, F77_INT np)
 
template<typename T >
do_blkmm (const octave_value &xov, const octave_value &yov)
 
OCTAVE_EXPORT octave_value_list Fblkmm (const octave_value_list &args, int) ar
 
OCTAVE_EXPORT octave_value_list Fdot (const octave_value_list &args, int) calculate the dot products along the first non-singleton dimension. If the optional argument ar
 
static void get_blkmm_dims (const dim_vector &dimx, const dim_vector &dimy, F77_INT &m, F77_INT &n, F77_INT &k, F77_INT &np, dim_vector &dimz)
 
static void get_red_dims (const dim_vector &x, const dim_vector &y, int dim, dim_vector &z, F77_INT &m, F77_INT &n, F77_INT &k)
 

Variables

is calculate the dot products along this dimension This is equivalent to but avoids forming a temporary array and is faster When ar {X} and ar{Y} are column vectors
 
is given
 
is calculate the dot products along this dimension This is equivalent to ode {sum (conj (ar{X}) .* ar{Y}, ar{dim})}
 

Function Documentation

◆ blkmm_internal() [1/4]

template<>
void blkmm_internal ( const FloatComplexNDArray x,
const FloatComplexNDArray y,
FloatComplexNDArray z,
F77_INT  m,
F77_INT  n,
F77_INT  k,
F77_INT  np 
)

Definition at line 237 of file dot.cc.

References cmatm3(), F77_CMPLX_ARG, F77_CONST_CMPLX_ARG, F77_XFCN, Array< T >::fortran_vec(), k, x, and y.

◆ blkmm_internal() [2/4]

template<>
void blkmm_internal ( const ComplexNDArray x,
const ComplexNDArray y,
ComplexNDArray z,
F77_INT  m,
F77_INT  n,
F77_INT  k,
F77_INT  np 
)

◆ blkmm_internal() [3/4]

template<>
void blkmm_internal ( const FloatNDArray x,
const FloatNDArray y,
FloatNDArray z,
F77_INT  m,
F77_INT  n,
F77_INT  k,
F77_INT  np 
)

Definition at line 261 of file dot.cc.

References F77_XFCN, Array< T >::fortran_vec(), k, smatm3(), x, and y.

◆ blkmm_internal() [4/4]

template<>
void blkmm_internal ( const NDArray x,
const NDArray y,
NDArray z,
F77_INT  m,
F77_INT  n,
F77_INT  k,
F77_INT  np 
)

Definition at line 271 of file dot.cc.

References dmatm3(), F77_XFCN, Array< T >::fortran_vec(), k, x, and y.

◆ do_blkmm()

template<typename T >
T do_blkmm ( const octave_value xov,
const octave_value yov 
)

Definition at line 314 of file dot.cc.

References get_blkmm_dims(), k, x, and y.

◆ Fblkmm()

OCTAVE_EXPORT octave_value_list Fblkmm ( const octave_value_list args,
int   
)

◆ Fdot()

OCTAVE_EXPORT octave_value_list Fdot ( const octave_value_list args,
int   
)

Definition at line 84 of file dot.cc.

◆ get_blkmm_dims()

static void get_blkmm_dims ( const dim_vector dimx,
const dim_vector dimy,
F77_INT m,
F77_INT n,
F77_INT k,
F77_INT np,
dim_vector dimz 
)
static

Definition at line 280 of file dot.cc.

References dim_vector::alloc(), error(), i, k, dim_vector::ndims(), and dim_vector::str().

Referenced by do_blkmm().

◆ get_red_dims()

static void get_red_dims ( const dim_vector x,
const dim_vector y,
int  dim,
dim_vector z,
F77_INT m,
F77_INT n,
F77_INT k 
)
static

Definition at line 34 of file dot.cc.

References dim_vector::alloc(), i, k, x, and y.

Variable Documentation

◆ ar

is calculate the dot products along this dimension This is equivalent to but avoids forming a temporary array and is faster When ar {X} and ar{Y} are column vectors

Definition at line 84 of file dot.cc.

◆ given

is given

Definition at line 84 of file dot.cc.

◆ ode

is calculate the dot products along this dimension This is equivalent to but avoids forming a temporary array and is faster When the result is equivalent to ode {sum (conj (ar{X}) .* ar{Y}, ar{dim})}

Definition at line 84 of file dot.cc.