1 /* ------------------------------------------------
2 Copyright 2014 AT&T Intellectual Property
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
7 http://www.apache.org/licenses/LICENSE-2.0
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ------------------------------------------- */
15 #ifndef _RTS_UDAF_H_INCLUDED_
16 #define _RTS_UDAF_H_INCLUDED_
20 #include "rts_external.h"
24 void avg_udaf_lfta_LFTA_AGGR_INIT_(gs_sp_t);
25 void avg_udaf_lfta_LFTA_AGGR_UPDATE_(gs_sp_t,gs_uint32_t);
26 gs_retval_t avg_udaf_lfta_LFTA_AGBGR_FLUSHME_(gs_sp_t);
27 void avg_udaf_lfta_LFTA_AGGR_OUTPUT_(struct gs_string *,gs_sp_t);
28 void avg_udaf_lfta_LFTA_AGGR_DESTROY_(gs_sp_t);
31 void moving_sum_lfta_LFTA_AGGR_INIT_(gs_sp_t b);
32 void moving_sum_lfta_LFTA_AGGR_UPDATE_(gs_sp_t b, gs_uint32_t v, gs_uint32_t N);
33 gs_retval_t moving_sum_lfta_LFTA_AGGR_FLUSHME_(gs_sp_t b);
34 void moving_sum_lfta_LFTA_AGGR_OUTPUT_(gs_uint64_t *r, gs_sp_t b);
35 gs_retval_t moving_sum_lfta_LFTA_AGGR_DESTROY_(gs_sp_t b);
39 void FIRST_lfta_LFTA_AGGR_INIT_(gs_uint32_t* scratch);
40 void FIRST_lfta_LFTA_AGGR_UPDATE_(gs_uint32_t* scratch, gs_uint32_t val);
41 gs_retval_t FIRST_lfta_LFTA_AGGR_FLUSHME_(gs_uint32_t* scratch);
42 void FIRST_lfta_LFTA_AGGR_OUTPUT_(gs_uint32_t* res, gs_uint32_t* scratch);
43 void FIRST_lfta_LFTA_AGGR_DESTROY_(gs_uint32_t* scratch);
45 void FIRST_ULL_lfta_LFTA_AGGR_INIT_(gs_uint64_t* scratch);
46 void FIRST_ULL_lfta_LFTA_AGGR_UPDATE_(gs_uint64_t* scratch, gs_uint64_t val);
47 gs_retval_t FIRST_ULL_lfta_LFTA_AGGR_FLUSHME_(gs_uint64_t* scratch);
48 void FIRST_ULL_lfta_LFTA_AGGR_OUTPUT_(gs_uint64_t* res, gs_uint64_t* scratch);
49 void FIRST_ULL_lfta_LFTA_AGGR_DESTROY_(gs_uint64_t* scratch);
51 void FIRST_STR_lfta_LFTA_AGGR_INIT_(struct gs_string* scratch);
52 void FIRST_STR_lfta_LFTA_AGGR_UPDATE_(struct gs_string* scratch, struct gs_string* val);
53 gs_retval_t FIRST_STR_lfta_LFTA_AGGR_FLUSHME_(struct gs_string* scratch);
54 void FIRST_STR_lfta_LFTA_AGGR_OUTPUT_(struct gs_string* res, struct gs_string* scratch);
55 void FIRST_STR_lfta_LFTA_AGGR_DESTROY_(struct gs_string* scratch);
58 void LAST_lfta_LFTA_AGGR_INIT_(gs_uint32_t* scratch);
59 void LAST_lfta_LFTA_AGGR_UPDATE_(gs_uint32_t* scratch, gs_uint32_t val);
60 gs_retval_t LAST_lfta_LFTA_AGGR_FLUSHME_(gs_uint32_t* scratch);
61 void LAST_lfta_LFTA_AGGR_OUTPUT_(gs_uint32_t* res, gs_uint32_t* scratch);
62 void LAST_lfta_LFTA_AGGR_DESTROY_(gs_uint32_t* scratch);
64 void LAST_ULL_lfta_LFTA_AGGR_INIT_(gs_uint64_t* scratch);
65 void LAST_ULL_lfta_LFTA_AGGR_UPDATE_(gs_uint64_t* scratch, gs_uint64_t val);
66 gs_retval_t LAST_ULL_lfta_LFTA_AGGR_FLUSHME_(gs_uint64_t* scratch);
67 void LAST_ULL_lfta_LFTA_AGGR_OUTPUT_(gs_uint64_t* res, gs_uint64_t* scratch);
68 void LAST_ULL_lfta_LFTA_AGGR_DESTROY_(gs_uint64_t* scratch);
70 void LAST_STR_lfta_LFTA_AGGR_INIT_(struct gs_string* scratch);
71 void LAST_STR_lfta_LFTA_AGGR_UPDATE_(struct gs_string* scratch, struct gs_string* val);
72 gs_retval_t LAST_STR_lfta_LFTA_AGGR_FLUSHME_(struct gs_string* scratch);
73 void LAST_STR_lfta_LFTA_AGGR_OUTPUT_(struct gs_string* res, struct gs_string* scratch);
74 void LAST_STR_lfta_LFTA_AGGR_DESTROY_(struct gs_string* scratch);
76 // running_array_aggr aggregate
77 void running_array_aggr_lfta_LFTA_AGGR_INIT_(char* scratch);
78 void running_array_aggr_lfta_LFTA_AGGR_UPDATE_(char* scratch, gs_uint32_t val);
79 gs_retval_t running_array_aggr_lfta_LFTA_AGGR_FLUSHME_(char* scratch);
80 void running_array_aggr_lfta_LFTA_AGGR_OUTPUT_(struct gs_string* res, char* scratch);
81 void running_array_aggr_lfta_LFTA_AGGR_DESTROY_(char* scratch);