ullong FUN [LFTA_LEGAL,COST FREE]ULLONG(uint);
ullong FUN [LFTA_LEGAL,COST FREE]ULLONG(int);
+///////////////////////////////////////////////////////////
+// Numeric functions
+///////////////////////////////////////////////////////////
+
+ float FUN [LFTA_LEGAL, COST LOW] sqrt(float);
+
///////////////////////////////////////////////////////////
// Convert an IPv4 address
#include "base_operator.h"
#include <vector>
#include <map>
+#include<math.h>
#include "rdtsc.h"
using namespace std;
#define LEQ(x,y) ((x)<=(y))
// Cast away temporality
#define non_temporal(x)(x)
-
+// Access math libraries
+#define sqrt(x) sqrt(x)
extern "C" {
void FIRST_STR_hfta_HFTA_AGGR_DESTROY_(vstring* scratch);
// last aggregate
+// hfta only
+void LAST_HFTA_AGGR_INIT_(gs_uint32_t* scratch);
+void LAST_HFTA_AGGR_REINIT_(gs_uint32_t* scratch);
+void LAST_HFTA_AGGR_UPDATE_(gs_uint32_t* scratch, gs_uint32_t val);
+void LAST_HFTA_AGGR_OUTPUT_(gs_uint32_t* res, gs_uint32_t* scratch);
+void LAST_HFTA_AGGR_DESTROY_(gs_uint32_t* scratch);
+
+void LAST_ULL_HFTA_AGGR_INIT_(gs_uint64_t* scratch);
+void LAST_ULL_HFTA_AGGR_REINIT_(gs_uint64_t* scratch);
+void LAST_ULL_HFTA_AGGR_UPDATE_(gs_uint64_t* scratch, gs_uint64_t val);
+void LAST_ULL_HFTA_AGGR_OUTPUT_(gs_uint64_t* res, gs_uint64_t* scratch);
+void LAST_ULL_HFTA_AGGR_DESTROY_(gs_uint64_t* scratch);
+
+void LAST_STR_HFTA_AGGR_INIT_(vstring* scratch);
+void LAST_STR_HFTA_AGGR_REINIT_(vstring* scratch);
+void LAST_STR_HFTA_AGGR_UPDATE_(vstring* scratch, vstring* val);
+void LAST_STR_HFTA_AGGR_OUTPUT_(vstring* res, vstring* scratch);
+void LAST_STR_HFTA_AGGR_DESTROY_(vstring* scratch);
+
+// hfta/lfta split
void LAST_hfta_HFTA_AGGR_INIT_(gs_uint32_t* scratch);
void LAST_hfta_HFTA_AGGR_REINIT_(gs_uint32_t* scratch);
void LAST_hfta_HFTA_AGGR_UPDATE_(gs_uint32_t* scratch, gs_uint32_t val);
------------------------------------------- */
#include <stdint.h>
+#include<math.h>
+
#include "gsconfig.h"
#include "gstypes.h"
// Cast away temporality
#define non_temporal(x)(x)
+// Access math libraries
+#define sqrt(x) sqrt(x)
+
+
gs_uint32_t str_match_offset( gs_uint32_t offset, struct gs_string * s1, struct gs_string * s2);
fprintf(stderr,"interface %s, LFTA %d, snap length is %d\n",liface.c_str(),mi,snap_lengths[mi]);
- lfta_val[lmach] += "\tfta_register(\""+query_names[mi]+"\", " + (lfta_reuse_options[mi]?"1":"0") + ", ";
- if(interface_names[mi]=="")
- lfta_val[lmach]+="DEFAULTDEV";
- else
- lfta_val[lmach]+='"'+interface_names[mi]+'"';
+ string this_iface = "DEFAULTDEV";
+ if(interface_names[mi]!="")
+ this_iface = '"'+interface_names[mi]+'"';
+ lfta_val[lmach] += "\tif(!strcmp(device,"+this_iface+"))\n";
+ lfta_val[lmach] += "\t\tfta_register(\""+query_names[mi]+"\", " + (lfta_reuse_options[mi]?"1":"0") + ", ";
+// if(interface_names[mi]=="")
+// lfta_val[lmach]+="DEFAULTDEV";
+// else
+// lfta_val[lmach]+='"'+interface_names[mi]+'"';
+ lfta_val[lmach] += this_iface;
+
lfta_val[lmach] += ", "+generate_alloc_name(query_names[mi])
+"\n#ifndef LFTA_IN_NIC\n\t,"+generate_schema_string_name(query_names[mi])
/////////////////////////////////////////////////////////
// LAST aggregate
+// hfta only
+
+void LAST_HFTA_AGGR_INIT_(gs_uint32_t* scratch) { }
+
+void LAST_HFTA_AGGR_REINIT_(gs_uint32_t* scratch) { }
+
+void LAST_HFTA_AGGR_UPDATE_(gs_uint32_t* scratch, gs_uint32_t val) {
+ *scratch = val;
+}
+
+void LAST_HFTA_AGGR_OUTPUT_(gs_uint32_t* res, gs_uint32_t* scratch) {
+ *res = *scratch;
+}
+
+void LAST_HFTA_AGGR_DESTROY_(gs_uint32_t* scratch) { }
+
+void LAST_ULLHFTA_AGGR_INIT_(gs_uint64_t* scratch) { }
+
+void LAST_ULL_HFTA_AGGR_REINIT_(gs_uint64_t* scratch) { }
+
+void LAST_ULL_HFTA_AGGR_UPDATE_(gs_uint64_t* scratch, gs_uint64_t val) {
+ *scratch = val;
+}
+
+void LAST_ULL_HFTA_AGGR_OUTPUT_(gs_uint64_t* res, gs_uint64_t* scratch) {
+ *res = *scratch;
+}
+
+void LAST_ULL_HFTA_AGGR_DESTROY_(gs_uint64_t* scratch) { }
+
+
+void LAST_STR_HFTA_AGGR_INIT_(vstring* scratch) {
+ scratch->offset= 0;
+}
+
+void LAST_STR_HFTA_AGGR_REINIT_(vstring* scratch) { }
+
+void LAST_STR_HFTA_AGGR_UPDATE_(vstring* scratch, vstring* val) {
+ scratch->length = val->length;
+ scratch->offset = val->offset;
+ scratch->reserved = SHALLOW_COPY;
+}
+
+void LAST_STR_HFTA_AGGR_OUTPUT_(vstring* res, vstring* scratch) {
+ *res = *scratch;
+}
+
+void LAST_STR_HFTA_AGGR_DESTROY_(vstring* scratch) { }
+
+// hfta/lfta split
+
void LAST_hfta_HFTA_AGGR_INIT_(gs_uint32_t* scratch) { }
void LAST_hfta_HFTA_AGGR_REINIT_(gs_uint32_t* scratch) { }
gs_sp_t curl_auth = NULL;
gs_uint32_t http_code;
- gs_uint32_t ves_version=5;
+ gs_uint32_t ves_version=7;
gs_uint32_t tlimit = 0; // time limit in seconds