1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/*
PsychToolbox3/Source/Common/DoNothing/DoNothing.c
PLATFORMS: Only OS X for now.
AUTHORS:
Allen Ingling awi Allen.Ingling@nyu.edu
HISTORY:
7/05/03 awi wrote it.
7/10/04
DESCRIPTION:
DoNothing in the OS 9 Psychtoolbox measures Matlab's mex calling overhead.
DoNothing in the OS X Psychtoolbox measures the combined overhead of Matlabs's mex and the Psychtoolbox "Scripting Glue" which
abstracts up Matlab's mex.
*/
#include "DoNothing.h"
PsychError DONOTHINGDoNothing(void)
{
double *returnValue;
int i, numReturnArguments;
numReturnArguments=PsychGetNumOutputArgs();
for(i=0;i<numReturnArguments;i++)
PsychAllocOutDoubleArg(i+1, TRUE, &returnValue);
return(PsychError_none);
}
/*
COPYRIGHT:
Copyright Denis Pelli, 1997.
This file may be distributed freely as long as this notice accompanies
it and any changes are noted in the source. It is distributed as is,
without any warranty implied or provided. We accept no liability for
any damage or loss resulting from the use of this software.
PURPOSE:
Do nothing. Used to measure Matlab's mex calling overhead.
HISTORY:
8/17/97 dgp Wrote it.
#include <Psychtoolbox.h>
ROUTINE: mexFunction()
char useDoNothing[]="[empty1,...]=DoNothing([arg1],[arg2],...)";
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, CONSTmxArray *prhs[])
{
long i;
nrhs;prhs;
for(i=0;i<nlhs;i++)plhs[i]=mxCreateDoubleMatrix(0,0,mxREAL);
}
*/
|