⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prob_cache.h

📁 Intel开发的IPP库的应用实例
💻 H
字号:
/*
//
//                  INTEL CORPORATION PROPRIETARY INFORMATION
//     This software is supplied under the terms of a license agreement or
//     nondisclosure agreement with Intel Corporation and may not be copied
//     or disclosed except in accordance with the terms of that agreement.
//          Copyright(c) 1999-2006 Intel Corporation. All Rights Reserved.
//
//     Intel(R) Integrated Performance Primitives Gaussian Mixture Sample for Windows*
//
//  By downloading and installing this sample, you hereby agree that the
//  accompanying Materials are being provided to you under the terms and
//  conditions of the End User License Agreement for the Intel(R) Integrated
//  Performance Primitives product previously accepted by you. Please refer
//  to the file ippEULA.rtf located in the root directory of your Intel(R) IPP
//  product installation for more information.
//
//
//     Probabilities Cache Management Class
//
//     Supplies probability for current frame
//     If it does not exist, calls calculator for probs vector
//     Cache size is state_number*vec_length
//     Cache crawls up to frame_num frames then switches to beginning
//     Statistics on probability vector length, used and wasted
//     probabilities is collected
//
*/

#ifndef aaaPROB_CACHE_Haaa
#define aaaPROB_CACHE_Haaa

#include "len_stat.h"

class Prob_Calc;

class Prob_Cache {

   protected:

      int    state_number;     // states (mixtures) number
      int    vec_length;       // length of probabilities vector
      int    frame_num;        // sentence length (frames)
      int    t;                // current absolute frame number

      Prob_Calc *calc;

      float *buffer;           // probabilities buffer
      float *curbuf;           // current buffer beginning
      float *endbuf;           // last possible buffer beginning
      short *last_calc;        // last calculated probability

      unsigned char *if_calc;  // used probability indicators
      int   *len_stat;         // statistics on probability vectors
      int    lost_prob;        // unused probabilities number

      int    ready;            //

   public:

      int   State_Number(void) {return state_number;}
      virtual bool Ready(void) {return ready==0;}

      int   Get_Probability(int state, float *prob);
      bool  Step_Forward(void);
      void  Get_Statistics(Len_Stat *stat);
      bool  Attach_Calc(Prob_Calc *calc);
      bool  Detach_Calc(void);

      int   Init_Cache(void);

      Prob_Cache (int state_number, int vec_length, int frame_num);
      virtual ~Prob_Cache(void);
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -