Macros | Typedefs
s3types.h File Reference

Size definition of semantically units. Common for both s3 and s3.X decoder. More...

#include <float.h>
#include <assert.h>
#include <prim_type.h>
#include <err.h>
#include <ckd_alloc.h>
#include <sphinx3_export.h>

Go to the source code of this file.

Macros

#define BAD_S3CIPID   ((s3cipid_t) -1)
 
#define NOT_S3CIPID(p)   ((p)<0)
 
#define IS_S3CIPID(p)   ((p)>=0)
 
#define MAX_S3CIPID   32767
 
#define BAD_S3PID   ((s3pid_t) -1)
 
#define NOT_S3PID(p)   ((p)<0)
 
#define IS_S3PID(p)   ((p)>=0)
 
#define MAX_S3PID   ((int32)0x7ffffffe)
 
#define BAD_S3SSID   ((s3ssid_t) -1)
 
#define NOT_S3SSID(p)   ((p)<0)
 
#define IS_S3SSID(p)   ((p)>=0)
 
#define MAX_S3SSID   ((int32)0x7ffffffe)
 
#define BAD_S3TMATID   ((s3tmatid_t) -1)
 
#define NOT_S3TMATID(t)   ((t)<0)
 
#define IS_S3TMATID(t)   ((t)>=0)
 
#define MAX_S3TMATID   ((int32)0x7ffffffe)
 
#define BAD_S3WID   ((s3wid_t) -1)
 
#define NOT_S3WID(w)   ((w)<0)
 
#define IS_S3WID(w)   ((w)>=0)
 
#define MAX_S3WID   ((int32)0x7ffffffe)
 
#define BAD_S3LMWID   ((s3lmwid_t) 0xffff)
 
#define NOT_S3LMWID(w)   ((w)==BAD_S3LMWID)
 
#define IS_S3LMWID(w)   ((w)!=BAD_S3LMWID)
 
#define MAX_S3LMWID   ((uint32)0xfffe)
 
#define BAD_LMCLASSID   (-1)
 
#define BAD_S3LMWID32   ((s3lmwid32_t) 0x0fffffff)
 
#define NOT_S3LMWID32(w)   ((w)==BAD_S3LMWID32)
 
#define IS_S3LMWID32(w)   ((w)!=BAD_S3LMWID32)
 
#define MAX_S3LMWID32   ((uint32)0xfffffffe)
 
#define BAD_LMWID(lm)   (lm->is32bits? BAD_S3LMWID32 : BAD_S3LMWID)
 
#define NOT_LMWID(lm, w)   (lm->is32bits? NOT_S3LMWID32(w): NOT_S3LMWID(w))
 
#define IS_LMWID(lm, w)   (lm->is32bits? IS_S3LMWID32(w): IS_S3LMWID(w))
 
#define MAX_LMWID(lm)   (lm->is32bits? MAX_S3LMWID32: MAX_S3LMWID)
 
#define BAD_S3LATID   ((s3latid_t) -1)
 
#define NOT_S3LATID(l)   ((l)<0)
 
#define IS_S3LATID(l)   ((l)>=0)
 
#define MAX_S3LATID   ((int32)0x7ffffffe)
 
#define BAD_S3FRMID   ((s3frmid_t) -1)
 
#define NOT_S3FRMID(f)   ((f)<0)
 
#define IS_S3FRMID(f)   ((f)>=0)
 
#define MAX_S3FRMID   ((int32)0x7ffe)
 
#define BAD_S3SENID   ((s3senid_t) -1)
 
#define NOT_S3SENID(s)   ((s)<0)
 
#define IS_S3SENID(s)   ((s)>=0)
 
#define MAX_S3SENID   ((int16)0x7ffe)
 
#define BAD_S3MGAUID   ((s3mgauid_t) -1)
 
#define NOT_S3MGAUID(m)   ((m)<0)
 
#define IS_S3MGAUID(m)   ((m)>=0)
 
#define MAX_S3MGAUID   ((int32)0x00007ffe)
 
#define S3_LOGPROB_ZERO   ((int32) 0xc8000000) /** Integer version of log of zero Approx -infinity!! */
 
#define S3_LOGPROB_ZERO_F   ((float32) -1e30) /** Float version of log of zero Approx -infinity!! */
 
#define S3_MAX_FRAMES   15000 /* Frame = 10msec */
 
#define RENORM_THRESH   ((int32) ((S3_LOGPROB_ZERO)>>1)) /** Bestscore getting close to 0 */
 
#define S3_SUCCESS   0
 
#define S3_ERROR   -1
 
#define S3_WARNING   -2
 
#define MAX_N_STATE   20
 
#define MAX_N_ATTRIB   5
 
#define TRUE   1
 
#define FALSE   0 /* assume that true is never defined w/o false */
 
#define IO_ELAPSED   0
 
#define UTT_ELAPSED   1
 
#define UTT_IO_ELAPSED   2
 
#define UTT_BW_ELAPSED   3
 
#define TYING_NON_EMITTING   (0xffffffff)
 
#define TYING_NO_ID   (0xffffffff)
 
#define MAX_VERSION_LEN   128
 
#define MEG   *1024*1024
 

Typedefs

typedef int16 s3cipid_t
 
typedef int32 s3pid_t
 
typedef s3pid_t s3ssid_t
 
typedef int32 s3tmatid_t
 
typedef int32 s3wid_t
 
typedef uint16 s3lmwid_t
 
typedef uint32 s3lmwid32_t
 
typedef int32 s3latid_t
 
typedef int16 s3frmid_t
 
typedef int16 s3senid_t
 
typedef int16 s3mgauid_t
 

Detailed Description

Size definition of semantically units. Common for both s3 and s3.X decoder.

Macro Definition Documentation

◆ BAD_LMCLASSID

#define BAD_LMCLASSID   (-1)

◆ BAD_LMWID

#define BAD_LMWID (   lm)    (lm->is32bits? BAD_S3LMWID32 : BAD_S3LMWID)

◆ BAD_S3CIPID

#define BAD_S3CIPID   ((s3cipid_t) -1)

Ci phone id

Referenced by compress_table().

◆ BAD_S3FRMID

#define BAD_S3FRMID   ((s3frmid_t) -1)

Frame id (must be SIGNED integer)

◆ BAD_S3LATID

#define BAD_S3LATID   ((s3latid_t) -1)

Lattice entry id

◆ BAD_S3LMWID

#define BAD_S3LMWID   ((s3lmwid_t) 0xffff)

LM word id (uint16 for conserving space)

◆ BAD_S3LMWID32

#define BAD_S3LMWID32   ((s3lmwid32_t) 0x0fffffff)

LM word id (uint32 for conserving space)

◆ BAD_S3MGAUID

#define BAD_S3MGAUID   ((s3mgauid_t) -1)

Mixture-gaussian codebook id

◆ BAD_S3PID

#define BAD_S3PID   ((s3pid_t) -1)

Phone id (triphone or ciphone)

◆ BAD_S3SENID

#define BAD_S3SENID   ((s3senid_t) -1)

Senone id

◆ BAD_S3SSID

#define BAD_S3SSID   ((s3ssid_t) -1)

Senone sequence id (triphone or ciphone)

Referenced by compress_table().

◆ BAD_S3TMATID

#define BAD_S3TMATID   ((s3tmatid_t) -1)

Transition matrix id; there can be as many as pids

◆ BAD_S3WID

#define BAD_S3WID   ((s3wid_t) -1)

Dictionary word id

◆ FALSE

#define FALSE   0 /* assume that true is never defined w/o false */

Referenced by main().

◆ IO_ELAPSED

#define IO_ELAPSED   0

◆ IS_LMWID

#define IS_LMWID (   lm,
 
)    (lm->is32bits? IS_S3LMWID32(w): IS_S3LMWID(w))

◆ IS_S3CIPID

#define IS_S3CIPID (   p)    ((p)>=0)

◆ IS_S3FRMID

#define IS_S3FRMID (   f)    ((f)>=0)

◆ IS_S3LATID

#define IS_S3LATID (   l)    ((l)>=0)

◆ IS_S3LMWID

#define IS_S3LMWID (   w)    ((w)!=BAD_S3LMWID)

◆ IS_S3LMWID32

#define IS_S3LMWID32 (   w)    ((w)!=BAD_S3LMWID32)

◆ IS_S3MGAUID

#define IS_S3MGAUID (   m)    ((m)>=0)

◆ IS_S3PID

#define IS_S3PID (   p)    ((p)>=0)

◆ IS_S3SENID

#define IS_S3SENID (   s)    ((s)>=0)

◆ IS_S3SSID

#define IS_S3SSID (   p)    ((p)>=0)

◆ IS_S3TMATID

#define IS_S3TMATID (   t)    ((t)>=0)

◆ IS_S3WID

#define IS_S3WID (   w)    ((w)>=0)

◆ MAX_LMWID

#define MAX_LMWID (   lm)    (lm->is32bits? MAX_S3LMWID32: MAX_S3LMWID)

◆ MAX_N_ATTRIB

#define MAX_N_ATTRIB   5

The maximum # of attributes associated with any given acoustic model

◆ MAX_N_STATE

#define MAX_N_STATE   20

The maximum # of states for any given acoustic model

◆ MAX_S3CIPID

#define MAX_S3CIPID   32767

◆ MAX_S3FRMID

#define MAX_S3FRMID   ((int32)0x7ffe)

◆ MAX_S3LATID

#define MAX_S3LATID   ((int32)0x7ffffffe)

◆ MAX_S3LMWID

#define MAX_S3LMWID   ((uint32)0xfffe)

◆ MAX_S3LMWID32

#define MAX_S3LMWID32   ((uint32)0xfffffffe)

◆ MAX_S3MGAUID

#define MAX_S3MGAUID   ((int32)0x00007ffe)

◆ MAX_S3PID

#define MAX_S3PID   ((int32)0x7ffffffe)

◆ MAX_S3SENID

#define MAX_S3SENID   ((int16)0x7ffe)

◆ MAX_S3SSID

#define MAX_S3SSID   ((int32)0x7ffffffe)

◆ MAX_S3TMATID

#define MAX_S3TMATID   ((int32)0x7ffffffe)

◆ MAX_S3WID

#define MAX_S3WID   ((int32)0x7ffffffe)

◆ MAX_VERSION_LEN

#define MAX_VERSION_LEN   128

◆ MEG

#define MEG   *1024*1024

◆ NOT_LMWID

#define NOT_LMWID (   lm,
 
)    (lm->is32bits? NOT_S3LMWID32(w): NOT_S3LMWID(w))

◆ NOT_S3CIPID

#define NOT_S3CIPID (   p)    ((p)<0)

◆ NOT_S3FRMID

#define NOT_S3FRMID (   f)    ((f)<0)

◆ NOT_S3LATID

#define NOT_S3LATID (   l)    ((l)<0)

◆ NOT_S3LMWID

#define NOT_S3LMWID (   w)    ((w)==BAD_S3LMWID)

◆ NOT_S3LMWID32

#define NOT_S3LMWID32 (   w)    ((w)==BAD_S3LMWID32)

◆ NOT_S3MGAUID

#define NOT_S3MGAUID (   m)    ((m)<0)

◆ NOT_S3PID

#define NOT_S3PID (   p)    ((p)<0)

◆ NOT_S3SENID

#define NOT_S3SENID (   s)    ((s)<0)

Referenced by dict2pid_comsenscr().

◆ NOT_S3SSID

#define NOT_S3SSID (   p)    ((p)<0)

◆ NOT_S3TMATID

#define NOT_S3TMATID (   t)    ((t)<0)

◆ NOT_S3WID

#define NOT_S3WID (   w)    ((w)<0)

◆ RENORM_THRESH

#define RENORM_THRESH   ((int32) ((S3_LOGPROB_ZERO)>>1)) /** Bestscore getting close to 0 */

◆ S3_ERROR

#define S3_ERROR   -1

◆ S3_LOGPROB_ZERO

#define S3_LOGPROB_ZERO   ((int32) 0xc8000000) /** Integer version of log of zero Approx -infinity!! */

Referenced by mgau_eval().

◆ S3_LOGPROB_ZERO_F

#define S3_LOGPROB_ZERO_F   ((float32) -1e30) /** Float version of log of zero Approx -infinity!! */

◆ S3_MAX_FRAMES

#define S3_MAX_FRAMES   15000 /* Frame = 10msec */

Referenced by word_cand_free().

◆ S3_SUCCESS

#define S3_SUCCESS   0

◆ S3_WARNING

#define S3_WARNING   -2

◆ TRUE

#define TRUE   1

◆ TYING_NO_ID

#define TYING_NO_ID   (0xffffffff)

◆ TYING_NON_EMITTING

#define TYING_NON_EMITTING   (0xffffffff)

◆ UTT_BW_ELAPSED

#define UTT_BW_ELAPSED   3

◆ UTT_ELAPSED

#define UTT_ELAPSED   1

◆ UTT_IO_ELAPSED

#define UTT_IO_ELAPSED   2

Typedef Documentation

◆ s3cipid_t

typedef int16 s3cipid_t

Size definitions for more semantially meaningful units. Illegal value definitions, limits, and tests for specific types. NOTE: Types will be either int32 or smaller; only smaller ones may be unsigned (i.e., no type will be uint32).

◆ s3frmid_t

typedef int16 s3frmid_t

◆ s3latid_t

typedef int32 s3latid_t

◆ s3lmwid32_t

typedef uint32 s3lmwid32_t

◆ s3lmwid_t

typedef uint16 s3lmwid_t

◆ s3mgauid_t

typedef int16 s3mgauid_t

◆ s3pid_t

typedef int32 s3pid_t

◆ s3senid_t

typedef int16 s3senid_t

◆ s3ssid_t

typedef s3pid_t s3ssid_t

◆ s3tmatid_t

typedef int32 s3tmatid_t

◆ s3wid_t

typedef int32 s3wid_t