changeset 67:8c7f60968a9e

(none)
author idamnjanovic
date Wed, 16 Mar 2011 14:07:15 +0000
parents a02503d91c8d
children f2ca04532eac
files DL/RLS-DLA/private/private/make.m DL/RLS-DLA/private/private/mexutils.c DL/RLS-DLA/private/private/mexutils.h DL/RLS-DLA/private/private/printf.m
diffstat 4 files changed, 0 insertions(+), 249 deletions(-) [+]
line wrap: on
line diff
--- a/DL/RLS-DLA/private/private/make.m	Wed Mar 16 13:58:32 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-function make
-%MAKE Build the OMPBox package.
-%  MAKE compiles all OMPBox MEX functions, using Matlab's default MEX
-%  compiler. If the MEX compiler has not been set-up before, please run
-%
-%    mex -setup
-%
-%  before using this MAKE file.
-
-%  Ron Rubinstein
-%  Computer Science Department
-%  Technion, Haifa 32000 Israel
-%  ronrubin@cs
-%
-%  August 2009
-
-
-% detect platform 
-
-compstr = computer;
-is64bit = strcmp(compstr(end-1:end),'64');
-
-
-% compilation parameters
-
-compile_params = cell(0);
-if (is64bit)
-  compile_params{1} = '-largeArrayDims';
-end
-
-
-% Compile files %
-
-ompsources = {'mexutils.c','ompcore.c','omputils.c','myblas.c','ompprof.c'};
-
-disp('Compiling ompmex...');
-mex('ompmex.c', ompsources{:},compile_params{:});
-
-disp('Compiling omp2mex...');
-mex('omp2mex.c',ompsources{:},compile_params{:});
-
--- a/DL/RLS-DLA/private/private/mexutils.c	Wed Mar 16 13:58:32 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/**************************************************************************
- *
- * File name: mexutils.c
- *
- * Ron Rubinstein
- * Computer Science Department
- * Technion, Haifa 32000 Israel
- * ronrubin@cs
- *
- * Last Updated: 15.8.2009
- *
- *************************************************************************/
-
-#include "mexutils.h"
-#include <math.h>
-
-
-
-/* verify that the mxArray contains a double matrix */
-
-void checkmatrix(const mxArray *param, char *fname, char *pname)
-{
-  char errmsg[100];
-  sprintf(errmsg, "%.15s requires that %.25s be a double matrix.", fname, pname);
-  if (!mxIsDouble(param) || mxIsComplex(param) || mxGetNumberOfDimensions(param)>2) {
-    mexErrMsgTxt(errmsg);
-  }
-}
-
-
-/* verify that the mxArray contains a 1-D double vector */
-
-void checkvector(const mxArray *param, char *fname, char *pname)
-{
-  char errmsg[100];
-  sprintf(errmsg, "%.15s requires that %.25s be a double vector.", fname, pname);
-  if (!mxIsDouble(param) || mxIsComplex(param) || mxGetNumberOfDimensions(param)>2 || (mxGetM(param)!=1 && mxGetN(param)!=1)) {
-    mexErrMsgTxt(errmsg);
-  }
-}
-
-
-/* verify that the mxArray contains a double scalar */
-
-void checkscalar(const mxArray *param, char *fname, char *pname)
-{
-  char errmsg[100];
-  sprintf(errmsg, "%.15s requires that %.25s be a double scalar.", fname, pname);
-  if (!mxIsDouble(param) || mxIsComplex(param) || mxGetNumberOfDimensions(param)>2 || 
-      mxGetM(param)!=1 || mxGetN(param)!=1) 
-  {
-    mexErrMsgTxt(errmsg);
-  }
-}
-
-
-/* verify that the mxArray contains a sparse matrix */
-
-void checksparse(const mxArray *param, char *fname, char *pname)
-{
-  char errmsg[100];
-  sprintf(errmsg, "%.15s requires that %.25s be sparse.", fname, pname);
-  if (!mxIsSparse(param)) {
-    mexErrMsgTxt(errmsg);
-  }
-}
-
-
-/* verify that the mxArray contains a 1-dimensional cell array */
-
-void checkcell_1d(const mxArray *param, char *fname, char *pname)
-{
-  char errmsg[100];
-  sprintf(errmsg, "%.15s requires that %.25s be a 1-D cell array.", fname, pname);
-  if (!mxIsCell(param) || mxGetNumberOfDimensions(param)>2 || (mxGetM(param)!=1 && mxGetN(param)!=1)) {
-    mexErrMsgTxt(errmsg);
-  }
-}
-
--- a/DL/RLS-DLA/private/private/mexutils.h	Wed Mar 16 13:58:32 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/**************************************************************************
- *
- * File name: mexutils.h
- *
- * Ron Rubinstein
- * Computer Science Department
- * Technion, Haifa 32000 Israel
- * ronrubin@cs
- *
- * Last Updated: 18.8.2009
- *
- * Utility functions for MEX files.
- *
- *************************************************************************/
-
-
-#ifndef __MEX_UTILS_H__
-#define __MEX_UTILS_H__
-
-#include "mex.h"
-
-
-
-/**************************************************************************
- * Function checkmatrix:
- *
- * Verify that the specified mxArray is real, of type double, and has 
- * no more than two dimensions. If not, an error message is printed
- * and the mex file terminates.
- * 
- * Parameters:
- *   param - the mxArray to be checked
- *   fname - the name of the function where the error occured (15 characters or less)
- *   pname - the name of the parameter (25 characters or less)
- *
- **************************************************************************/
-void checkmatrix(const mxArray *param, char *fname, char *pname);
-
-
-/**************************************************************************
- * Function checkvector:
- *
- * Verify that the specified mxArray is 1-D, real, and of type double. The
- * vector may be a column or row vector. Otherwise, an error message is
- * printed and the mex file terminates.
- * 
- * Parameters:
- *   param - the mxArray to be checked
- *   fname - the name of the function where the error occured (15 characters or less)
- *   pname - the name of the parameter (25 characters or less)
- *
- **************************************************************************/
-void checkvector(const mxArray *param, char *fname, char *pname);
-
-
-/**************************************************************************
- * Function checkscalar:
- *
- * Verify that the specified mxArray represents a real double scalar value. 
- * If not, an error message is printed and the mex file terminates.
- * 
- * Parameters:
- *   param - the mxArray to be checked
- *   fname - the name of the function where the error occured (15 characters or less)
- *   pname - the name of the parameter (25 characters or less)
- *
- **************************************************************************/
-void checkscalar(const mxArray *param, char *fname, char *pname);
-
-
-/**************************************************************************
- * Function checksparse:
- *
- * Verify that the specified mxArray contains a sparse matrix. If not,
- * an error message is printed and the mex file terminates.
- * 
- * Parameters:
- *   param - the mxArray to be checked
- *   fname - the name of the function where the error occured (15 characters or less)
- *   pname - the name of the parameter (25 characters or less)
- *
- **************************************************************************/
-void checksparse(const mxArray *param, char *fname, char *pname);
-
-
-/**************************************************************************
- * Function checkcell_1d:
- *
- * Verify that the specified mxArray is a 1-D cell array. The cell array 
- * may be arranged as either a column or a row. If not, an error message 
- * is printed and the mex file terminates.
- * 
- * Parameters:
- *   param - the mxArray to be checked
- *   fname - the name of the function where the error occured (15 characters or less)
- *   pname - the name of the parameter (25 characters or less)
- *
- **************************************************************************/
-void checkcell_1d(const mxArray *param, char *fname, char *pname);
-
-
-#endif
-
--- a/DL/RLS-DLA/private/private/printf.m	Wed Mar 16 13:58:32 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-function str = printf(varargin)
-%PRINTF Print formatted text to screen.
-%  PRINTF(FMT,VAL1,VAL2,...) formats the data in VAL1,VAL2,... according to
-%  the format string FMT, and prints the result to the screen.
-%
-%  The call to PRINTF(FMT,VAL1,VAL2,...) simply invokes the call
-%  DISP(SPRINTF(FMT,VAL1,VAL2,...)). For a complete description of the
-%  format string options see function SPRINTF.
-%
-%  STR = PRINTF(...) also returns the formatted string.
-
-
-%  Ron Rubinstein
-%  Computer Science Department
-%  Technion, Haifa 32000 Israel
-%  ronrubin@cs
-%
-%  April 2008
-
-
-if (nargout>0)
-  str = sprintf(varargin{:});
-  disp(str);
-else
-  disp(sprintf(varargin{:}));
-end