<commit_before>/*
 * Copyright 2008 by The University of Edinburgh
 *
 * See the file COPYING for the licence associated with this software.
 *
 * HTKFlatModelsThreading.cpp  -  based on HTKFlatModels, with added functions for 2-thread decoding
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <cassert>
#include <cstdlib>
#include "log_add.h"

#include "HTKFlatModelsThreading.h"
#include "LogFile.h"

using namespace Torch;

namespace Juicer {

HTKFlatModelsThreading::HTKFlatModelsThreading() {
    fQueue = NULL;
    fCounter = -1;
    fStart = fEnd = 0;
    fRunning = true;
}

HTKFlatModelsThreading::~HTKFlatModelsThreading() {
    delete[] fQueue;
}

void HTKFlatModelsThreading::init()
{
    HTKFlatModels::init();

    fQueue = new FProbQueue[nGMMs];
    for(int i = 0; i < nGMMs; i++){
        fQueue[i].next=-1;
        fQueue[i].t=-1;
    }
}

bool HTKFlatModelsThreading::cachedOutput(int gmmInd, real* outp) {
    int n = currFrame - fCacheT[gmmInd];
    if (n < fnBlock) {<commit_msg>add Intel IPP headers to HTKFlatModelsThreading.cpp<commit_after>/*
 * Copyright 2008 by The University of Edinburgh
 *
 * See the file COPYING for the licence associated with this software.
 *
 * HTKFlatModelsThreading.cpp  -  based on HTKFlatModels, with added functions for 2-thread decoding
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <cassert>
#include <cstdlib>
#include "log_add.h"

#include "HTKFlatModelsThreading.h"
#include "LogFile.h"

#ifdef HAVE_INTEL_IPP
#include <ippcore.h>
#include <ipps.h>
#include <ippsr.h>
#endif

using namespace Torch;

namespace Juicer {

HTKFlatModelsThreading::HTKFlatModelsThreading() {
    fQueue = NULL;
    fCounter = -1;
    fStart = fEnd = 0;
    fRunning = true;
}

HTKFlatModelsThreading::~HTKFlatModelsThreading() {
    delete[] fQueue;
}

void HTKFlatModelsThreading::init()
{
    HTKFlatModels::init();

    fQueue = new FProbQueue[nGMMs];
    for(int i = 0; i < nGMMs; i++){
        fQueue[i].next=-1;
        fQueue[i].t=-1;
    }
}

bool HTKFlatModelsThreading::cachedOutput(int gmmInd, real* outp) {
    int n = currFrame - fCacheT[gmmInd];
    if (n < fnBlock) {
{'fraction_non_alphanumeric': 0.1202414113277623, 'fraction_numerical': 0.009285051067780872, 'mean_word_length': 3.9200913242009134, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3493027', 'n_tokens_mistral': 800, 'n_tokens_neox': 795, 'n_words': 190}