Mercurial > hg > octave-nkf
view examples/mycell.c @ 17886:326963e47984
use stl_algo.h-fixed for GCC 4.8.0 and 4.8.1 if nth_element bug is detected
* acinclude.m4 (OCTAVE_CHECK_BROKEN_STL_ALGO_H): If nth_element test
fails and we are using GCC 4.8.0 or 4.8.1, then don't reset
octave_cv_broken_stl_algo_h. Someone may have patched their 4.8.0 or
4.8.1 GCC with the buggy performance patch for 4.8.2. Ubuntu, I'm
looking at you.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 08 Nov 2013 11:42:44 -0500 |
parents | 224e76250443 |
children |
line wrap: on
line source
#include "mex.h" void mexFunction (int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { mwSize n; mwIndex i; if (nrhs != 1 || ! mxIsCell (prhs[0])) mexErrMsgTxt ("ARG1 must be a cell"); n = mxGetNumberOfElements (prhs[0]); n = (n > nlhs ? nlhs : n); for (i = 0; i < n; i++) plhs[i] = mxDuplicateArray (mxGetCell (prhs[0], i)); }