#include "f77-fcn.h"
#include "mx-base.h"
#include "error.h"
#include "defun-dld.h"
#include "parse.h"
Go to the source code of this file.
Functions | |
DEFUN_DLD (dot, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} dot (@var{x}, @var{y}, @var{dim})\n\ Compute the dot product of two vectors. If @var{x} and @var{y}\n\ are matrices, calculate the dot products along the first\n\ non-singleton dimension. If the optional argument @var{dim} is\n\ given, calculate the dot products along this dimension.\n\ \n\ This is equivalent to\n\ @code{sum (conj (@var{X}) .* @var{Y}, @var{dim})},\n\ but avoids forming a temporary array and is faster. When @var{X} and\n\ @var{Y} are column vectors, the result is equivalent to\n\ @code{@var{X}' * @var{Y}}.\n\ @seealso{cross, divergence}\n\ @end deftypefn") | |
DEFUN_DLD (blkmm, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} blkmm (@var{A}, @var{B})\n\ Compute products of matrix blocks. The blocks are given as\n\ 2-dimensional subarrays of the arrays @var{A}, @var{B}.\n\ The size of @var{A} must have the form @code{[m,k,@dots{}]} and\n\ size of @var{B} must be @code{[k,n,@dots{}]}. The result is\n\ then of size @code{[m,n,@dots{}]} and is computed as follows:\n\ \n\ @example\n\ @group\n\ for i = 1:prod (size (@var{A})(3:end))\n\ @var{C}(:,:,i) = @var{A}(:,:,i) * @var{B}(:,:,i)\n\ endfor\n\ @end group\n\ @end example\n\ @end deftypefn") | |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex *F77_RET_T | F77_FUNC (dmatm3, DMATM3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T | F77_FUNC (sdot3, SDOT3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T | F77_FUNC (cdotc3, CDOTC3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const float const float float *F77_RET_T | F77_FUNC (zmatm3, ZMATM3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double *F77_RET_T | F77_FUNC (smatm3, SMATM3)(const octave_idx_type & |
F77_RET_T | F77_FUNC (ddot3, DDOT3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T | F77_FUNC (cmatm3, CMATM3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T | F77_FUNC (zdotc3, ZDOTC3)(const octave_idx_type & |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const float const float float *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const Complex const Complex Complex *F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex *static void | get_red_dims (const dim_vector &x, const dim_vector &y, int dim, dim_vector &z, octave_idx_type &m, octave_idx_type &n, octave_idx_type &k) |
DEFUN_DLD | ( | dot | , | |
args | ||||
) |
Definition at line 106 of file dot.cc.
References octave_value::array_value(), cdotc3(), octave_value::complex_array_value(), Array< T >::data(), ddot3(), octave_value::dims(), do_binary_op(), octave_value_list::empty(), error(), error_state, F77_XFCN, feval(), dim_vector::first_non_singleton(), octave_value::float_array_value(), octave_value::float_complex_array_value(), Array< T >::fortran_vec(), get_red_dims(), octave_value::is_complex_type(), octave_value::is_float_type(), octave_value::is_numeric_type(), octave_value::is_single_type(), dim_vector::is_vector(), match(), octave_value::op_el_mul, print_usage(), dim_vector::redim(), octave_value::reshape(), sdot3(), x, and zdotc3().
DEFUN_DLD | ( | blkmm | , | |
args | ||||
) |
Definition at line 254 of file dot.cc.
References dim_vector::alloc(), octave_value::array_value(), cmatm3(), octave_value::complex_array_value(), Array< T >::data(), octave_value::dims(), dmatm3(), error(), error_state, F77_XFCN, octave_value::float_array_value(), octave_value::float_complex_array_value(), Array< T >::fortran_vec(), octave_value::is_complex_type(), octave_value::is_numeric_type(), octave_value::is_single_type(), dim_vector::length(), match(), print_usage(), smatm3(), dim_vector::str(), x, and zmatm3().
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex* F77_RET_T F77_FUNC | ( | dmatm3 | , | |
DMATM3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T F77_FUNC | ( | sdot3 | , | |
SDOT3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T F77_FUNC | ( | cdotc3 | , | |
CDOTC3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const float const float float* F77_RET_T F77_FUNC | ( | zmatm3 | , | |
ZMATM3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double* F77_RET_T F77_FUNC | ( | smatm3 | , | |
SMATM3 | ||||
) | const |
F77_RET_T F77_FUNC | ( | ddot3 | , | |
DDOT3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T F77_FUNC | ( | cmatm3 | , | |
CMATM3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T F77_FUNC | ( | zdotc3 | , | |
ZDOTC3 | ||||
) | const |
F77_RET_T const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const double const double double* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const float const float float* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const Complex const Complex Complex* F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type const FloatComplex const FloatComplex FloatComplex* static void get_red_dims | ( | const dim_vector & | x, | |
const dim_vector & | y, | |||
int | dim, | |||
dim_vector & | z, | |||
octave_idx_type & | m, | |||
octave_idx_type & | n, | |||
octave_idx_type & | k | |||
) | [static] |
Definition at line 78 of file dot.cc.
References dim_vector::alloc(), dim_vector::length(), and x.
Referenced by DEFUN_DLD().