M3_otfs.h

00001 /*******************************************************************************
00002 *                                                                              *
00003 *   M3:  M3_otfs.h                                                             *
00004 *                                                                              *
00005 *   Version 2.0.1 May 2007                                                     *
00006 *                                                                              *
00007 *   Copyright (C) 2007  C.M. Cantalupo                                         *
00008 *                                                                              *
00009 *   This program is free software; you can redistribute it and/or modify       *
00010 *   it under the terms of the GNU General Public License as published by       *
00011 *   the Free Software Foundation; either version 2 of the License, or          *
00012 *   (at your option) any later version.                                        *
00013 *                                                                              *
00014 *   This program is distributed in the hope that it will be useful,            *
00015 *   but WITHOUT ANY WARRANTY; without even the implied warranty of             *
00016 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
00017 *   GNU General Public License for more details.                               *
00018 *                                                                              *
00019 *   You should have received a copy of the GNU General Public License          *
00020 *   along with this program; if not, write to the Free Software                *
00021 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  *
00022 *                                                                              *
00023 *******************************************************************************/
00024 
00025 #ifndef _H_M3_otfs
00026 #define _H_M3_otfs
00027 
00028 #include "M3.h"
00029 #include "M3_internal.h"
00030 #include "M3_system.h"
00031 
00032 
00033 #define M3_FILTER_DOMAIN_TIME 0
00034 #define M3_FILTER_DOMAIN_FREQ 1
00035 #define M3_SRNG_MAX_NUM_STREAM 33554432
00036 
00037 
00038 typedef struct
00039 {
00040   unsigned char *array;
00041   int64_t numEl;
00042 } M3_BitArray;
00043 
00044 /* These functions need to be imported from MADmap */
00045 
00046 void M3_BitArray_Init( M3_BitArray *bitArray, int64_t numEl, void *memorySpace );
00047 
00048 void M3_BitArray_SetBit( M3_BitArray *bitArray, int64_t bitIndex, int bitVal );
00049 
00050 int M3_BitArray_GetBit( M3_BitArray *bitArray,
00051                         int64_t bitIndex );
00052 
00053 int32_t M3_binarySearch( int32_t numEl, 
00054                          int32_t *sortedArray, 
00055                          int32_t value );
00056 
00057 int32_t M3_binarySearch_noCheck(int32_t numEl, 
00058                              int32_t *sortedArray, 
00059                              int32_t value );
00060 
00061 
00062 /* */
00063 
00064 int64_t M3_RunConfigStruct_AddClassOffsets( M3_RunConfigStruct *runConfig );
00065 
00066 int M3_RunConfigStruct_SumNumClassPixels( M3_RunConfigStruct *runConfig, int32_t *pixelSum );
00067 
00068 
00069 int M3_DataSetLL_AugmentHitBits( M3_DataSetLL *dataSetNode, M3_PixelClassLL *pixelClassList,  M3_IntervalLL *readIntervalList, M3_BitArray *hitBits, int useSimPointing );
00070 
00071 int M3_BitArray_SumBits( M3_BitArray *bitArray, int64_t *bitSum );
00072 
00073 int M3_BitArray_ConvertBitsToIndex( M3_BitArray *bitArray, int64_t arrayLength, int32_t *index );
00074 
00075 int M3_RunConfigStruct_InitializeMapSimStore( M3_RunConfigStruct *runConfig, int32_t numPixel, M3_MapEl *storeMap );
00076 
00077 int M3_RunConfigStruct_DestroyMapSimStore( M3_RunConfigStruct *runConfig );
00078 
00079 int M3_RunConfigStruct_GetPixelConvertSize( M3_RunConfigStruct *runConfig, M3_BitArray *hitBits, int useFullLookup, size_t *pixelConvertSize );
00080 
00081 int M3_RunConfigStruct_addPixConv( M3_RunConfigStruct *runConfig, int useFullLookup, M3_BitArray *hitBits, void *pixelConvertSpace );
00082 
00083  
00084 int M3_DataSetLL_GetGlobalPointing( M3_DataSetLL *dataSetNode, M3_PixelClassLL *pixelClassList, M3_Interval readInterval, M3_PointingEl *pointing );
00085 
00086 int M3_DataSetLL_GetScanMapSimTOD( M3_DataSetLL *dataSet, M3_Interval readInterval, int useSimPointing, double *outScan );
00087 
00088 
00089 void SRNG_gwn(double *ulist, double *glist, int gcount, double sigma);
00090 
00091 void SRNG_Generate_UniformNoise( int32_t seed, int32_t streamID, int32_t streamOffset, int32_t numEl, double *uniformOutput );
00092 void SRNG_Generate_WhiteNoise( uint32_t seed, int32_t streamID, int32_t streamOffset, uint32_t numEl, double sigma, double *whiteOutput );
00093 
00094 
00095 
00096 #endif

Generated on Mon Nov 24 10:05:12 2008 for M3 by  doxygen 1.5.3-20071008