00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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