GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <config.h>
#include <cfloat>
#include <csetjmp>
#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <set>
#include "f77-fcn.h"
#include "lo-ieee.h"
#include "oct-locbuf.h"
#include "Cell.h"
#include "mxarray.h"
#include "mexproto.h"
#include "oct-map.h"
#include "oct-obj.h"
#include "ov.h"
#include "ov-mex-fcn.h"
#include "ov-usr-fcn.h"
#include "pager.h"
#include "parse.h"
#include "toplev.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "graphics.h"
Go to the source code of this file.
Classes | |
class | mex |
class | mxArray_cell |
class | mxArray_matlab |
class | mxArray_number |
class | mxArray_octave_value |
class | mxArray_sparse |
class | mxArray_struct |
Typedefs | |
typedef void(* | cmex_fptr )(int nlhs, mxArray **plhs, int nrhs, mxArray **prhs) |
typedef F77_RET_T(* | fmex_fptr )(int &nlhs, mxArray **plhs, int &nrhs, mxArray **prhs) |
Variables | |
mex * | mex_context = 0 |
std::map< std::string, int > | mex_lock_count |
|
static |
Definition at line 115 of file mex.cc.
Referenced by mxArray_octave_value::calc_single_subscript(), and mxArray_matlab::calc_single_subscript().
octave_value_list call_mex | ( | bool | have_fmex, |
void * | f, | ||
const octave_value_list & | args, | ||
int | nargout_arg, | ||
octave_mex_function * | curr_mex_fcn | ||
) |
Definition at line 3002 of file mex.cc.
References action_container::add_fcn(), mxArray::as_octave_value(), mex::cleanup(), context, error_state, mex::jump, octave_value_list::length(), mex::make_value(), OCTAVE_LOCAL_BUFFER, action_container::protect_var(), octave_value_list::resize(), and action_container::run().
Referenced by octave_mex_function::do_multi_index_op().
Definition at line 2460 of file mex.cc.
References mex::mark_array().
Referenced by mxCreateCellArray(), mxCreateCellMatrix(), mxCreateCharArray(), mxCreateCharMatrixFromStrings(), mxCreateDoubleMatrix(), mxCreateDoubleScalar(), mxCreateLogicalArray(), mxCreateLogicalMatrix(), mxCreateLogicalScalar(), mxCreateNumericArray(), mxCreateNumericMatrix(), mxCreateSparse(), mxCreateSparseLogicalMatrix(), mxCreateString(), mxCreateStructArray(), mxCreateStructMatrix(), and mxDuplicateArray().
|
inlinestatic |
Definition at line 2348 of file mex.cc.
References mex::mark_foreign().
Referenced by mxArray_octave_value::get_data(), mxArray_octave_value::get_ir(), and mxArray_octave_value::get_jc().
|
inlinestatic |
Definition at line 2366 of file mex.cc.
References mex::unmark().
Referenced by mexMakeMemoryPersistent(), mxSetData(), mxSetDimensions(), mxSetImagData(), mxSetIr(), mxSetJc(), mxSetPi(), and mxSetPr().
Definition at line 2357 of file mex.cc.
References mex::unmark_array().
Referenced by mexMakeArrayPersistent(), mxArray_cell::set_cell(), and mxArray_struct::set_field_by_number().
int mexAtExit | ( | void(*)(void) | f | ) |
Definition at line 3365 of file mex.cc.
References octave_mex_function::atexit(), mex::current_mex_function(), and f.
int mexCallMATLAB | ( | int | nargout, |
mxArray * | argout[], | ||
int | nargin, | ||
mxArray * | argin[], | ||
const char * | fname | ||
) |
Definition at line 3086 of file mex.cc.
References mex::abort(), mxArray::as_octave_value(), error_state, feval(), octave_value_list::length(), mex::make_value(), octave_value_list::resize(), and mex::trap_feval_error.
Definition at line 3188 of file mex.cc.
References mex::abort(), error(), mexFunctionName(), OCTAVE_LOCAL_BUFFER, and verror_with_id().
void mexErrMsgTxt | ( | const char * | s | ) |
Definition at line 3173 of file mex.cc.
References mex::abort(), error(), and mexFunctionName().
Referenced by mexGetVariable(), and mexPutVariable().
Definition at line 3152 of file mex.cc.
References error_state, and eval_string().
const char* mexFunctionName | ( | void | ) |
Definition at line 3080 of file mex.cc.
References mex::function_name().
Referenced by mexErrMsgIdAndTxt(), mexErrMsgTxt(), mexIsLocked(), mexLock(), mexUnlock(), and mexWarnMsgIdAndTxt().
Definition at line 3380 of file mex.cc.
References octave_value::as_mxArray(), error_state, get_property_from_handle(), and octave_value::is_defined().
Definition at line 3248 of file mex.cc.
References action_container::add_fcn(), error_state, get_global_value(), octave_call_stack::goto_base_frame(), octave_value::is_defined(), mex::make_value(), mexErrMsgTxt(), octave_call_stack::pop(), mxArray::set_name(), and symbol_table::varval().
Referenced by mexGetVariablePtr().
Definition at line 3297 of file mex.cc.
References mexGetVariable().
Definition at line 3391 of file mex.cc.
References mxIsFromGlobalWS().
int mexIsLocked | ( | void | ) |
Definition at line 3397 of file mex.cc.
References mexFunctionName(), and mislocked().
void mexLock | ( | void | ) |
Definition at line 3414 of file mex.cc.
References mexFunctionName(), and mlock().
void mexMakeArrayPersistent | ( | mxArray * | ptr | ) |
Definition at line 3353 of file mex.cc.
References maybe_unmark_array().
void mexMakeMemoryPersistent | ( | void * | ptr | ) |
Definition at line 3359 of file mex.cc.
References maybe_unmark().
Definition at line 3237 of file mex.cc.
References octave_stdout, and octave_vformat().
Definition at line 3303 of file mex.cc.
References action_container::add_fcn(), mxArray::as_octave_value(), symbol_table::assign(), error_state, mxArray::get_name(), octave_call_stack::goto_base_frame(), mexErrMsgTxt(), octave_call_stack::pop(), and set_global_value().
Definition at line 3430 of file mex.cc.
References mxArray::as_octave_value(), and set_property_in_handle().
void mexSetTrapFlag | ( | int | flag | ) |
Definition at line 3145 of file mex.cc.
References mex::trap_feval_error.
void mexUnlock | ( | void | ) |
Definition at line 3439 of file mex.cc.
References mexFunctionName(), and munlock().
Definition at line 3218 of file mex.cc.
References mexFunctionName(), OCTAVE_LOCAL_BUFFER, and vwarning_with_id().
Definition at line 2916 of file mex.cc.
References mxArray::add_field().
Definition at line 2978 of file mex.cc.
References mxArray::array_to_string().
Definition at line 2984 of file mex.cc.
References mxArray::calc_single_subscript().
Definition at line 2432 of file mex.cc.
References mex::calloc().
Definition at line 2467 of file mex.cc.
References maybe_mark_array().
Definition at line 2473 of file mex.cc.
References maybe_mark_array().
Definition at line 2479 of file mex.cc.
References maybe_mark_array(), and mxCHAR_CLASS.
Definition at line 2485 of file mex.cc.
References maybe_mark_array().
mxArray* mxCreateDoubleMatrix | ( | mwSize | m, |
mwSize | n, | ||
mxComplexity | flag | ||
) |
Definition at line 2491 of file mex.cc.
References maybe_mark_array(), and mxDOUBLE_CLASS.
Definition at line 2497 of file mex.cc.
References maybe_mark_array(), and mxDOUBLE_CLASS.
Definition at line 2503 of file mex.cc.
References maybe_mark_array(), and mxLOGICAL_CLASS.
Definition at line 2509 of file mex.cc.
References maybe_mark_array(), and mxLOGICAL_CLASS.
Definition at line 2515 of file mex.cc.
References maybe_mark_array(), and mxLOGICAL_CLASS.
mxArray* mxCreateNumericArray | ( | mwSize | ndims, |
const mwSize * | dims, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 2521 of file mex.cc.
References maybe_mark_array().
mxArray* mxCreateNumericMatrix | ( | mwSize | m, |
mwSize | n, | ||
mxClassID | class_id, | ||
mxComplexity | flag | ||
) |
Definition at line 2528 of file mex.cc.
References maybe_mark_array().
mxArray* mxCreateSparse | ( | mwSize | m, |
mwSize | n, | ||
mwSize | nzmax, | ||
mxComplexity | flag | ||
) |
Definition at line 2535 of file mex.cc.
References maybe_mark_array(), and mxDOUBLE_CLASS.
Definition at line 2541 of file mex.cc.
References maybe_mark_array(), and mxLOGICAL_CLASS.
Definition at line 2547 of file mex.cc.
References maybe_mark_array().
mxArray* mxCreateStructArray | ( | mwSize | ndims, |
const mwSize * | dims, | ||
int | num_keys, | ||
const char ** | keys | ||
) |
Definition at line 2553 of file mex.cc.
References maybe_mark_array().
Definition at line 2560 of file mex.cc.
References maybe_mark_array().
void mxDestroyArray | ( | mxArray * | ptr | ) |
Definition at line 2574 of file mex.cc.
References mex::free_value().
Definition at line 2567 of file mex.cc.
References mxArray::dup(), and maybe_mark_array().
void mxFree | ( | void * | ptr | ) |
Definition at line 2451 of file mex.cc.
References mex::free(), and xfree().
Referenced by mxArray_struct::add_field(), mxArray_octave_value::as_mxArray(), mxArray_struct::remove_field(), mxArray_matlab::set_class_name(), mxArray::set_name(), mex::~mex(), mxArray::~mxArray(), mxArray_cell::~mxArray_cell(), mxArray_matlab::~mxArray_matlab(), mxArray_number::~mxArray_number(), mxArray_octave_value::~mxArray_octave_value(), mxArray_sparse::~mxArray_sparse(), and mxArray_struct::~mxArray_struct().
Definition at line 2866 of file mex.cc.
References mxArray::get_cell().
Definition at line 2797 of file mex.cc.
References mxArray::get_data().
Definition at line 2847 of file mex.cc.
References mxArray::get_class_id().
Definition at line 2853 of file mex.cc.
References mxArray::get_class_name().
void* mxGetData | ( | const mxArray * | ptr | ) |
Definition at line 2809 of file mex.cc.
References mxArray::get_data().
Definition at line 2739 of file mex.cc.
References mxArray::get_dimensions().
Definition at line 2990 of file mex.cc.
References mxArray::get_element_size().
Definition at line 2928 of file mex.cc.
References mxGetFieldByNumber(), and mxGetFieldNumber().
Definition at line 2935 of file mex.cc.
References mxArray::get_field_by_number().
Referenced by mxGetField().
Definition at line 2960 of file mex.cc.
References mxArray::get_field_name_by_number().
Definition at line 2966 of file mex.cc.
References mxArray::get_field_number().
Referenced by mxGetField(), and mxSetField().
void* mxGetImagData | ( | const mxArray * | ptr | ) |
Definition at line 2815 of file mex.cc.
References mxArray::get_imag_data().
double mxGetInf | ( | void | ) |
Definition at line 2419 of file mex.cc.
References lo_ieee_inf_value().
Definition at line 2879 of file mex.cc.
References mxArray::get_ir().
Definition at line 2885 of file mex.cc.
References mxArray::get_jc().
Definition at line 2803 of file mex.cc.
References mxArray::get_data().
Definition at line 2727 of file mex.cc.
References mxArray::get_m().
Definition at line 2733 of file mex.cc.
References mxArray::get_n().
double mxGetNaN | ( | void | ) |
Definition at line 2425 of file mex.cc.
References lo_ieee_nan_value().
Definition at line 2745 of file mex.cc.
References mxArray::get_number_of_dimensions().
Definition at line 2751 of file mex.cc.
References mxArray::get_number_of_elements().
Definition at line 2954 of file mex.cc.
References mxArray::get_number_of_fields().
Definition at line 2891 of file mex.cc.
References mxArray::get_nzmax().
Definition at line 2785 of file mex.cc.
References mxArray::get_imag_data().
Definition at line 2779 of file mex.cc.
References mxArray::get_data().
Definition at line 2791 of file mex.cc.
References mxArray::get_scalar().
Definition at line 2972 of file mex.cc.
References mxArray::get_string().
Definition at line 2582 of file mex.cc.
References mxArray::is_cell().
Definition at line 2588 of file mex.cc.
References mxArray::is_char().
Definition at line 2594 of file mex.cc.
References mxArray::is_class().
Definition at line 2600 of file mex.cc.
References mxArray::is_complex().
Definition at line 2606 of file mex.cc.
References mxArray::is_double().
Definition at line 2711 of file mex.cc.
References mxArray::is_empty().
Definition at line 2395 of file mex.cc.
References lo_ieee_finite.
Definition at line 2718 of file mex.cc.
Referenced by mexIsGlobal().
Definition at line 2612 of file mex.cc.
References mxArray::is_function_handle().
Definition at line 2401 of file mex.cc.
References lo_ieee_isinf.
Definition at line 2618 of file mex.cc.
References mxArray::is_int16().
Definition at line 2624 of file mex.cc.
References mxArray::is_int32().
Definition at line 2630 of file mex.cc.
References mxArray::is_int64().
Definition at line 2636 of file mex.cc.
References mxArray::is_int8().
Definition at line 2642 of file mex.cc.
References mxArray::is_logical().
Definition at line 2697 of file mex.cc.
References mxArray::is_logical_scalar().
Definition at line 2704 of file mex.cc.
References mxArray::is_logical_scalar_true().
Definition at line 2407 of file mex.cc.
References lo_ieee_isnan.
Definition at line 2648 of file mex.cc.
References mxArray::is_numeric().
Definition at line 2654 of file mex.cc.
References mxArray::is_single().
Definition at line 2660 of file mex.cc.
References mxArray::is_sparse().
Definition at line 2666 of file mex.cc.
References mxArray::is_struct().
Definition at line 2672 of file mex.cc.
References mxArray::is_uint16().
Definition at line 2678 of file mex.cc.
References mxArray::is_uint32().
Definition at line 2684 of file mex.cc.
References mxArray::is_uint64().
Definition at line 2690 of file mex.cc.
References mxArray::is_uint8().
void* mxMalloc | ( | size_t | n | ) |
Definition at line 2438 of file mex.cc.
References malloc(), and mex::malloc().
void* mxRealloc | ( | void * | ptr, |
size_t | size | ||
) |
Definition at line 2444 of file mex.cc.
References mex::realloc().
Referenced by mxArray_struct::add_field().
Definition at line 2922 of file mex.cc.
References mxArray::remove_field().
Definition at line 2872 of file mex.cc.
References mxArray::set_cell().
Definition at line 2859 of file mex.cc.
References mxArray::set_class_name().
void mxSetData | ( | mxArray * | ptr, |
void * | pr | ||
) |
Definition at line 2834 of file mex.cc.
References maybe_unmark(), and mxArray::set_data().
Definition at line 2770 of file mex.cc.
References maybe_unmark(), and mxArray::set_dimensions().
Definition at line 2941 of file mex.cc.
References mxGetFieldNumber(), and mxSetFieldByNumber().
Definition at line 2948 of file mex.cc.
References mxArray::set_field_by_number().
Referenced by mxSetField().
void mxSetImagData | ( | mxArray * | ptr, |
void * | pi | ||
) |
Definition at line 2840 of file mex.cc.
References maybe_unmark(), and mxArray::set_imag_data().
Definition at line 2897 of file mex.cc.
References maybe_unmark(), and mxArray::set_ir().
Definition at line 2903 of file mex.cc.
References maybe_unmark(), and mxArray::set_jc().
Definition at line 2758 of file mex.cc.
References mxArray::set_m().
Definition at line 2764 of file mex.cc.
References mxArray::set_n().
Definition at line 2909 of file mex.cc.
References mxArray::set_nzmax().
Definition at line 2828 of file mex.cc.
References maybe_unmark(), and mxArray::set_imag_data().
Definition at line 2822 of file mex.cc.
References maybe_unmark(), and mxArray::set_data().
Definition at line 80 of file mex.cc.
Referenced by mxArray_struct::add_field().
|
static |
Definition at line 58 of file mex.cc.
References free().
Referenced by mex::cleanup(), mex::free(), and mxFree().