Overview
| Comment: | Moved matlab/octave data type conversion functions to a separate file. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
cdb81663cf6fedc5a44ab1a98ec7c127 |
| User & Date: | geraint@users.sourceforge.net on 2002-05-08 14:51:04.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2002-05-08
| ||
| 16:03:32 |
Added mex support for ode2odes: mtt sys ode2odes mexglx. This mex stuff seems to require octave2.1-headers. check-in: 20ae5bf7e0 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
| 14:51:04 | Moved matlab/octave data type conversion functions to a separate file. check-in: cdb81663cf user: geraint@users.sourceforge.net tags: origin/master, trunk | |
| 14:14:55 | Tidied up ode2odes code - reduced interweaving of STANDALONE/OCTAVEDLD sections check-in: 80539fd341 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt
from [c87980939a]
to [570aa6b93c].
| ︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.335 2002/05/01 17:30:55 geraint ## Improved pre-processor directives to better accommodate future alternatives (matlab) ## if necessary. ## ## Revision 1.334 2002/05/01 14:10:22 gawthrop ## Added -dr foo (reads from dir foo) option ## | > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Copyright (C) 2001 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.336 2002/05/07 23:50:34 geraint ## Preliminary support for Matlab dynamically linked shared objects: ## invoke with: mtt -cc sys rep mexglx ## ode2odes support is not yet included. ## ## Revision 1.335 2002/05/01 17:30:55 geraint ## Improved pre-processor directives to better accommodate future alternatives (matlab) ## if necessary. ## ## Revision 1.334 2002/05/01 14:10:22 gawthrop ## Added -dr foo (reads from dir foo) option ## |
| ︙ | ︙ | |||
2110 2111 2112 2113 2114 2115 2116 |
${MKOCTFILE} -DCODEGENTARGET=OCTAVEDLD $define_octave_dev \$<
## .mex files
$1_%.mexglx: $1_%.cc $1_def.h $1_sympar.h $1_cr.h
echo Creating $1_\$*.mexglx
${MTT_CXX} -shared -o $1_\$*.mexglx $1_\$*.cc \
${MTT_MATLAB_FLAGS} -DCODEGENTARGET=MATLABMEX \
| | | 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 |
${MKOCTFILE} -DCODEGENTARGET=OCTAVEDLD $define_octave_dev \$<
## .mex files
$1_%.mexglx: $1_%.cc $1_def.h $1_sympar.h $1_cr.h
echo Creating $1_\$*.mexglx
${MTT_CXX} -shared -o $1_\$*.mexglx $1_\$*.cc \
${MTT_MATLAB_FLAGS} -DCODEGENTARGET=MATLABMEX \
${MTT_CXXINCS} ${MTT_CXXLIBS} ${MTT_CXXFLAGS} ${MTT_LIB}/cc/mtt_kpathsea.cc ${MTT_LIB}/cc/mtt_matlab_octave.cc
## .cc files
.PRECIOUS: %.cc # Don't let mtt delete them
$1_%.cc: $1_%.m
mtt_m2cc.sh $1 \$* cat
mtt_%.cc: ${MTT_LIB}/cc/mtt_%.cc
|
| ︙ | ︙ |
Modified mttroot/mtt/bin/mttrc
from [d1cbabffc3]
to [7e41f569d0].
| ︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.32 2002/05/07 23:50:34 geraint ## Preliminary support for Matlab dynamically linked shared objects: ## invoke with: mtt -cc sys rep mexglx ## ode2odes support is not yet included. ## ## Revision 1.31 2002/05/02 20:12:45 geraint ## Added -Wl,--rpath to MTT_CXXLIBS. Sets the runtime linker path so that the | > > > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.33 2002/05/08 11:39:36 gawthrop ## Added MTT_REP to PATH ## ## Revision 1.32 2002/05/07 23:50:34 geraint ## Preliminary support for Matlab dynamically linked shared objects: ## invoke with: mtt -cc sys rep mexglx ## ode2odes support is not yet included. ## ## Revision 1.31 2002/05/02 20:12:45 geraint ## Added -Wl,--rpath to MTT_CXXLIBS. Sets the runtime linker path so that the |
| ︙ | ︙ | |||
238 239 240 241 242 243 244 |
MATLAB_LIBS="-Wl,--rpath-link,${MATLAB_ROOT}/extern/lib/${MATLAB_ARCH},--rpath-link,${MATLAB_ROOT}/bin/${MATLAB_ARCH} -L${MATLAB_ROOT}/bin/${MATLAB_ARCH} -lmx -lmex -lm"
# exported variables
export MTT_CXX="g++"
export MTT_CXXFLAGS="${DEBUG} ${OPTIM} ${FLAGS}"
export MTT_CXXLIBS="${LOCTAVE} ${LSYSTEM}"
| | | 241 242 243 244 245 246 247 248 249 250 251 |
MATLAB_LIBS="-Wl,--rpath-link,${MATLAB_ROOT}/extern/lib/${MATLAB_ARCH},--rpath-link,${MATLAB_ROOT}/bin/${MATLAB_ARCH} -L${MATLAB_ROOT}/bin/${MATLAB_ARCH} -lmx -lmex -lm"
# exported variables
export MTT_CXX="g++"
export MTT_CXXFLAGS="${DEBUG} ${OPTIM} ${FLAGS}"
export MTT_CXXLIBS="${LOCTAVE} ${LSYSTEM}"
export MTT_CXXINCS="-I. -I${MTT_LIB}/cc ${IOCTAVE}"
export MTT_LDFLAGS=" "
export MTT_MATLAB_FLAGS="${MATLAB_FLAGS} ${MATLAB_INCS} ${MATLAB_LIBS}"
fi
|
Modified mttroot/mtt/bin/trans/mtt_header
from [aeb001e855]
to [630b2a9dfd].
| ︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.46 2002/05/07 13:48:43 geraint ## Improved clarity of code generated for -cc and -oct (except ode2odes). ## Octave DEFUN_DLDs now call (rather than replace) their .cc equivalents. ## ## Revision 1.45 2002/05/02 09:30:22 gawthrop ## _ssim.m now returns t as 4th arg ## | > > > > > | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Copyright (C) 2000 by Peter J. Gawthrop ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.47 2002/05/07 23:50:34 geraint ## Preliminary support for Matlab dynamically linked shared objects: ## invoke with: mtt -cc sys rep mexglx ## ode2odes support is not yet included. ## ## Revision 1.46 2002/05/07 13:48:43 geraint ## Improved clarity of code generated for -cc and -oct (except ode2odes). ## Octave DEFUN_DLDs now call (rather than replace) their .cc equivalents. ## ## Revision 1.45 2002/05/02 09:30:22 gawthrop ## _ssim.m now returns t as 4th arg ## |
| ︙ | ︙ | |||
880 881 882 883 884 885 886 |
write_mex ()
{
func=${1:-"<insert function name>"}
args=${2:-""}
cat <<EOF
#if (CODEGENTARGET == MATLABMEX)
| | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | | 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 |
write_mex ()
{
func=${1:-"<insert function name>"}
args=${2:-""}
cat <<EOF
#if (CODEGENTARGET == MATLABMEX)
#include <mtt_matlab_octave.hh>
extern "C"
{
void mexFunction (int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[])
{
EOF
map_mex_inputs ${args}
cat <<EOF
plhs[0] = mtt_mxArray (${func} (${args}));
}
}
|
| ︙ | ︙ |
Added mttroot/mtt/lib/cc/mtt_matlab_octave.cc version [b74de52abf].
Added mttroot/mtt/lib/cc/mtt_matlab_octave.hh version [7d4f1bcd2c].