rt_nonfinite.cpp
Go to the documentation of this file.
00001 /*
00002  * rt_nonfinite.cpp
00003  *
00004  * Code generation for function 'Optimal_affine_tracking_3d16_fast_realtime'
00005  *
00006  * C source code generated on: Wed Jul 24 16:11:35 2013
00007  *
00008  */
00009 
00010 /*
00011  * Abstract:
00012  *      MATLAB for code generation function to initialize non-finites,
00013  *      (Inf, NaN and -Inf).
00014  */
00015 #include "rt_nonfinite.h"
00016 #include "rtGetNaN.h"
00017 #include "rtGetInf.h"
00018 
00019 real_T rtInf;
00020 real_T rtMinusInf;
00021 real_T rtNaN;
00022 real32_T rtInfF;
00023 real32_T rtMinusInfF;
00024 real32_T rtNaNF;
00025 
00026 /* Function: rt_InitInfAndNaN ==================================================
00027  * Abstract:
00028  * Initialize the rtInf, rtMinusInf, and rtNaN needed by the
00029  * generated code. NaN is initialized as non-signaling. Assumes IEEE.
00030  */
00031 void rt_InitInfAndNaN(size_t realSize)
00032 {
00033   (void) (realSize);
00034   rtNaN = rtGetNaN();
00035   rtNaNF = rtGetNaNF();
00036   rtInf = rtGetInf();
00037   rtInfF = rtGetInfF();
00038   rtMinusInf = rtGetMinusInf();
00039   rtMinusInfF = rtGetMinusInfF();
00040 }
00041 
00042 /* Function: rtIsInf ==================================================
00043  * Abstract:
00044  * Test if value is infinite
00045  */
00046 boolean_T rtIsInf(real_T value)
00047 {
00048   return ((value==rtInf || value==rtMinusInf) ? 1U : 0U);
00049 }
00050 
00051 /* Function: rtIsInfF =================================================
00052  * Abstract:
00053  * Test if single-precision value is infinite
00054  */
00055 boolean_T rtIsInfF(real32_T value)
00056 {
00057   return(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
00058 }
00059 
00060 /* Function: rtIsNaN ==================================================
00061  * Abstract:
00062  * Test if value is not a number
00063  */
00064 boolean_T rtIsNaN(real_T value)
00065 {
00066 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00067   return _isnan(value)? TRUE:FALSE;
00068 #else
00069   return (value!=value)? 1U:0U;
00070 #endif
00071 }
00072 
00073 /* Function: rtIsNaNF =================================================
00074  * Abstract:
00075  * Test if single-precision value is not a number
00076  */
00077 boolean_T rtIsNaNF(real32_T value)
00078 {
00079 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00080   return _isnan((real_T)value)? true:false;
00081 #else
00082   return (value!=value)? 1U:0U;
00083 #endif
00084 }
00085 
00086 
00087 /* End of code generation (rt_nonfinite.cpp) */


depth_tracker_ros_vr8
Author(s): shusain
autogenerated on Fri Dec 6 2013 20:45:47