<commit_before>/*
 * Author: <NAME>
 * Copyright (C) 2012-13 by <NAME>
 * This file is part of the esvmTestCPP library.
 * It is released under the MIT License.
 * Project Homepage: https://github.com/imisra/esvmTestCPP
 *  
 */
#ifndef ESVM_UTILS_HEADER
#define ESVM_UTILS_HEADER 

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <map>

//opencv includes
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"

//common (between ispc and C)
#include "esvm_common_structs.h"

//timing
#include "CycleTimer.h"


//compiler macros
#if __GNUC__ < 3
    #define __builtin_expect(foo,bar) (foo)
    #define expect(foo,bar) (foo)
#else
    #define expect(foo,bar) __builtin_expect((long)(foo),bar)
#endif
   
/**
   From the Linux kernel.
   */
#define __likely(foo) expect((foo),1)
#define __unlikely(foo) expect((foo),0)

//mem alignment
//#define ESVM_CONFIG_ALIGN_MEMORY
#define ESVM_CONFIG_ALIGN_MEMORY_BOUNDARY 16

#define ESVM_MAX_EXEMPLARS 1000
#define ESVM_MAX_FILENAME_CHARS 2048

//to access bounding boxes
#define ESVM_BOX_DIM 8
#define ARR_I(arr,i) (arr+i*ESVM_BOX_DIM)<commit_msg>Update esvm_utils.h<commit_after>/*
 * Author: <NAME>
 * Copyright (C) 2012-13 by <NAME>
 * This file is part of the esvmTestCPP library.
 * It is released under the MIT License.
 * Project Homepage: https://github.com/imisra/esvmTestCPP
 *  
 */
#ifndef ESVM_UTILS_HEADER
#define ESVM_UTILS_HEADER 

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <map>

//opencv includes
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"

//common (between ispc and C)
#include "esvm_common_structs.h"

//timing
#include "CycleTimer.h"


//compiler macros
#if __GNUC__ < 3
    #define __builtin_expect(foo,bar) (foo)
    #define expect(foo,bar) (foo)
#else
    #define expect(foo,bar) __builtin_expect((long)(foo),bar)
#endif
   
/**
   From the Linux kernel.
   */
#define __likely(foo) expect((foo),1)
#define __unlikely(foo) expect((foo),0)

//mem alignment
//#define ESVM_CONFIG_ALIGN_MEMORY
#define ESVM_CONFIG_ALIGN_MEMORY_BOUNDARY 16

#define ESVM_MAX_EXEMPLARS 1000
#define ESVM_MAX_FILENAME_CHARS 2048

//to access bounding boxes
#define ESVM_BOX_DIM 8
#define ARR_I(arr,i) (arr+(i)*ESVM_BOX_DIM)
{'fraction_non_alphanumeric': 0.13107202680067, 'fraction_numerical': 0.019262981574539362, 'mean_word_length': 4.957605985037406, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '4853624', 'n_tokens_mistral': 973, 'n_tokens_neox': 929, 'n_words': 214}