Files
openairinterface5g/openair1/USERSPACE_TOOLS/MATLAB/PHY/TOOLS/mexfiles/log2_approx.c
T
Lionel Gauthier 059a0a3fdc astyle --recursive --indent=spaces=2 --style=kr --indent-col1-comments --break-blocks --convert-tabs --max-code-length=200
This is done for better merging branch/LG_PRE_RELEASE_0.3 into trunk (same process is applied on this branch)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7073 818b1a75-f10b-46b9-bf7c-635c3b92a50f
2015-04-09 09:29:12 +00:00

21 lines
436 B
C

#include "../../../defs.h"
void mexFunction( int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[]
)
{
/* Declare */
unsigned int x;
unsigned char *l2;
/* Allocate input */
x = (unsigned int) mxGetScalar(prhs[0]);
/* Allocate Output */
plhs[0] = mxCreateNumericMatrix(1, 1, mxUINT8_CLASS, mxREAL);
l2 = (unsigned char*) mxGetPr(plhs[0]);
/* Algo */
*l2 = log2_approx(x);
}