Fix warnings, merge, and check my code in
[satune.git] / src / Encoders / naiveelementencoder.c
1 #include "naiveelementencoder.h"
2 #include "elementencoding.h"
3 #include "element.h"
4 #include "set.h"
5 #include "common.h"
6 #include "structs.h"
7 #include <strings.h>
8
9 void baseBinaryIndexElementAssign(ElementEncoding *This) {
10         Element * element=This->element;
11         Set * set=element->set;
12         ASSERT(set->isRange==false);
13         uint size=getSizeVectorInt(set->members);
14         uint encSize=NEXTPOW2(size);
15         allocEncodingArrayElement(This, encSize);
16         allocInUseArrayElement(This, encSize);
17
18         for(uint i=0;i<size;i++) {
19                 This->encodingArray[i]=getVectorInt(set->members, i);
20                 setInUseElement(This, i);
21         }
22 }
23