musrfit 1.10.0
mud_gen.c File Reference
#include <time.h>
#include <math.h>
#include "mud.h"
Include dependency graph for mud_gen.c:

Go to the source code of this file.

Macros

#define PACK_OP   1
 
#define UNPACK_OP   2
 

Functions

static int MUD_SEC_GEN_HIST_dopack _ANSI_ARGS_ ((int num, int inBinSize, void *inHist, int outBinSize, void *outHist))
 
static int n_bytes_needed _ANSI_ARGS_ ((UINT32 val))
 
static UINT32 varBinArray _ANSI_ARGS_ ((void *pHistData, int binSize, int index))
 
static void next_few_bins _ANSI_ARGS_ ((int num_tot, int inBinSize, void *pHistData, int outBinSize_now, MUD_VAR_BIN_LEN_TYPE *pNum_next, MUD_VAR_BIN_SIZ_TYPE *pOutBinSize_next))
 
int MUD_SEC_GEN_RUN_DESC_proc (MUD_OPT op, BUF *pBuf, MUD_SEC_GEN_RUN_DESC *pMUD)
 
int MUD_SEC_GEN_HIST_HDR_proc (MUD_OPT op, BUF *pBuf, MUD_SEC_GEN_HIST_HDR *pMUD)
 
int MUD_SEC_GEN_HIST_DAT_proc (MUD_OPT op, BUF *pBuf, MUD_SEC_GEN_HIST_DAT *pMUD)
 
int MUD_SEC_GEN_SCALER_proc (MUD_OPT op, BUF *pBuf, MUD_SEC_GEN_SCALER *pMUD)
 
int MUD_SEC_GEN_IND_VAR_proc (MUD_OPT op, BUF *pBuf, MUD_SEC_GEN_IND_VAR *pMUD)
 
int MUD_SEC_GEN_ARRAY_proc (MUD_OPT op, BUF *pBuf, MUD_SEC_GEN_ARRAY *pMUD)
 
int MUD_SEC_GEN_HIST_pack (int num, int inBinSize, void *inHist, int outBinSize, void *outHist)
 
int MUD_SEC_GEN_HIST_unpack (int num, int inBinSize, void *inHist, int outBinSize, void *outHist)
 
static int MUD_SEC_GEN_HIST_dopack (int num, int inBinSize, void *inHist, int outBinSize, void *outHist)
 
static int n_bytes_needed (UINT32 val)
 
static UINT32 varBinArray (void *pHistData, int binSize, int index)
 
static void next_few_bins (int num_tot, int inBinSize, void *pHistData, int outBinSize_now, MUD_VAR_BIN_LEN_TYPE *pNum_next, MUD_VAR_BIN_SIZ_TYPE *pOutBinSize_next)
 

Variables

static int pack_op
 

Macro Definition Documentation

◆ PACK_OP

#define PACK_OP   1

Definition at line 34 of file mud_gen.c.

Referenced by MUD_SEC_GEN_HIST_dopack(), MUD_SEC_GEN_HIST_pack(), and varBinArray().

◆ UNPACK_OP

#define UNPACK_OP   2

Definition at line 35 of file mud_gen.c.

Referenced by MUD_SEC_GEN_HIST_dopack(), MUD_SEC_GEN_HIST_unpack(), and varBinArray().

Function Documentation

◆ _ANSI_ARGS_() [1/4]

static int MUD_SEC_GEN_HIST_dopack _ANSI_ARGS_ ( (int num, int inBinSize, void *inHist, int outBinSize, void *outHist) )
static

◆ _ANSI_ARGS_() [2/4]

static void next_few_bins _ANSI_ARGS_ ( (int num_tot, int inBinSize, void *pHistData, int outBinSize_now, MUD_VAR_BIN_LEN_TYPE *pNum_next, MUD_VAR_BIN_SIZ_TYPE *pOutBinSize_next) )
static

References next_few_bins().

◆ _ANSI_ARGS_() [3/4]

static int n_bytes_needed _ANSI_ARGS_ ( (UINT32 val) )
static

References n_bytes_needed().

◆ _ANSI_ARGS_() [4/4]

static UINT32 varBinArray _ANSI_ARGS_ ( (void *pHistData, int binSize, int index) )
static

References varBinArray().

◆ MUD_SEC_GEN_ARRAY_proc()

◆ MUD_SEC_GEN_HIST_DAT_proc()

int MUD_SEC_GEN_HIST_DAT_proc ( MUD_OPT op,
BUF * pBuf,
MUD_SEC_GEN_HIST_DAT * pMUD )

◆ MUD_SEC_GEN_HIST_dopack()

static int MUD_SEC_GEN_HIST_dopack ( int num,
int inBinSize,
void * inHist,
int outBinSize,
void * outHist )
static

◆ MUD_SEC_GEN_HIST_HDR_proc()

◆ MUD_SEC_GEN_HIST_pack()

int MUD_SEC_GEN_HIST_pack ( int num,
int inBinSize,
void * inHist,
int outBinSize,
void * outHist )

Definition at line 534 of file mud_gen.c.

References MUD_SEC_GEN_HIST_dopack(), PACK_OP, and pack_op.

Referenced by _ANSI_ARGS_(), MUD_pack(), and MUD_SEC_GEN_HIST_dopack().

◆ MUD_SEC_GEN_HIST_unpack()

int MUD_SEC_GEN_HIST_unpack ( int num,
int inBinSize,
void * inHist,
int outBinSize,
void * outHist )

Definition at line 541 of file mud_gen.c.

References MUD_SEC_GEN_HIST_dopack(), pack_op, and UNPACK_OP.

Referenced by _ANSI_ARGS_(), MUD_SEC_GEN_HIST_dopack(), and MUD_unpack().

◆ MUD_SEC_GEN_IND_VAR_proc()

◆ MUD_SEC_GEN_RUN_DESC_proc()

◆ MUD_SEC_GEN_SCALER_proc()

int MUD_SEC_GEN_SCALER_proc ( MUD_OPT op,
BUF * pBuf,
MUD_SEC_GEN_SCALER * pMUD )

◆ n_bytes_needed()

static int n_bytes_needed ( UINT32 val)
static

Definition at line 905 of file mud_gen.c.

Referenced by _ANSI_ARGS_(), MUD_SEC_GEN_HIST_dopack(), and next_few_bins().

◆ next_few_bins()

static void next_few_bins ( int num_tot,
int inBinSize,
void * pHistData,
int outBinSize_now,
MUD_VAR_BIN_LEN_TYPE * pNum_next,
MUD_VAR_BIN_SIZ_TYPE * pOutBinSize_next )
static

Definition at line 957 of file mud_gen.c.

References n_bytes_needed(), and varBinArray().

Referenced by _ANSI_ARGS_(), and MUD_SEC_GEN_HIST_dopack().

◆ varBinArray()

static UINT32 varBinArray ( void * pHistData,
int binSize,
int index )
static

Definition at line 915 of file mud_gen.c.

References bdecode_1, bdecode_2(), bdecode_4(), PACK_OP, pack_op, and UNPACK_OP.

Referenced by _ANSI_ARGS_(), MUD_SEC_GEN_HIST_dopack(), and next_few_bins().

Variable Documentation

◆ pack_op

int pack_op
static