/*********************************************** !!!! DO NOT EDIT THIS FILE !!!! This file was auto-generated by Build.PL from lib/KinoSearch/Util/SortExternal.pm See KinoSearch::Docs::DevGuide for details. ***********************************************/ #line 219 "lib/KinoSearch/Util/SortExternal.pm" #ifndef H_KINOSEARCH_UTIL_SORT_EXTERNAL #define H_KINOSEARCH_UTIL_SORT_EXTERNAL 1 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "KinoSearchStoreInStream.h" #include "KinoSearchStoreOutStream.h" #include "KinoSearchUtilByteBuf.h" #include "KinoSearchUtilCClass.h" #include "KinoSearchUtilMemManager.h" typedef struct sortexrun { double start; double file_pos; double end; ByteBuf **cache; I32 cache_cap; I32 cache_elems; I32 cache_pos; I32 slice_size; } SortExRun; typedef struct sortexternal { ByteBuf **cache; /* item cache, both incoming and outgoing */ I32 cache_cap; /* allocated limit for cache */ I32 cache_elems; /* number of elems in cache */ I32 cache_pos; /* index of current element in cache */ ByteBuf **scratch; /* memory for use by mergesort */ I32 scratch_cap; /* allocated limit for scratch */ I32 mem_threshold; /* bytes of mem allowed for cache */ I32 cache_bytes; /* bytes of mem occupied by cache */ I32 run_cache_limit; /* bytes of mem allowed each run cache */ SortExRun **runs; I32 num_runs; SV *outstream_sv; OutStream *outstream; SV *instream_sv; InStream *instream; SV *invindex_sv; SV *seg_name_sv; void (*feed) (struct sortexternal*, char*, I32); ByteBuf* (*fetch)(struct sortexternal*); } SortExternal; SortExternal* Kino_SortEx_new(SV*, SV*, SV*, I32); void Kino_SortEx_feed(SortExternal*, char*, I32); ByteBuf* Kino_SortEx_fetch(SortExternal*); ByteBuf* Kino_SortEx_fetch_death(SortExternal*); void Kino_SortEx_enable_fetch(SortExternal*); void Kino_SortEx_sort_cache(SortExternal*); void Kino_SortEx_sort_run(SortExternal*); void Kino_SortEx_destroy(SortExternal*); #endif /* include guard */