@@ -58,111 +58,117 @@ std::shared_ptr<IntegerCODEC> const& CODECFactory::getFromName(std::string name)
5858 return scodecmap.at (name);
5959}
6060
61+ // std::make_unique equivalent
62+ template <typename T, typename ... Args>
63+ static std::unique_ptr<T> make_unique (Args&&... args) {
64+ return std::unique_ptr<T>(new T (std::forward<Args>(args)...));
65+ }
66+
6167std::unique_ptr<IntegerCODEC> fastbinarypacking8_codec () {
62- return std:: make_unique<CompositeCodec<FastBinaryPacking<8 >, VariableByte>>();
68+ return make_unique<CompositeCodec<FastBinaryPacking<8 >, VariableByte>>();
6369}
6470std::unique_ptr<IntegerCODEC> fastbinarypacking16_codec () {
65- return std:: make_unique<CompositeCodec<FastBinaryPacking<16 >, VariableByte>>();
71+ return make_unique<CompositeCodec<FastBinaryPacking<16 >, VariableByte>>();
6672}
6773std::unique_ptr<IntegerCODEC> fastbinarypacking32_codec () {
68- return std:: make_unique<CompositeCodec<FastBinaryPacking<32 >, VariableByte>>();
74+ return make_unique<CompositeCodec<FastBinaryPacking<32 >, VariableByte>>();
6975}
7076std::unique_ptr<IntegerCODEC> BP32_codec () {
71- return std:: make_unique<CompositeCodec<BP32, VariableByte>>();
77+ return make_unique<CompositeCodec<BP32, VariableByte>>();
7278}
7379std::unique_ptr<IntegerCODEC> vsencoding_codec () {
74- return std:: make_unique<vsencoding::VSEncodingBlocks>(1U << 16 );
80+ return make_unique<vsencoding::VSEncodingBlocks>(1U << 16 );
7581}
7682std::unique_ptr<IntegerCODEC> fastpfor128_codec () {
77- return std:: make_unique<CompositeCodec<FastPFor<4 >, VariableByte>>();
83+ return make_unique<CompositeCodec<FastPFor<4 >, VariableByte>>();
7884}
7985std::unique_ptr<IntegerCODEC> fastpfor256_codec () {
80- return std:: make_unique<CompositeCodec<FastPFor<8 >, VariableByte>>();
86+ return make_unique<CompositeCodec<FastPFor<8 >, VariableByte>>();
8187}
8288std::unique_ptr<IntegerCODEC> simdfastpfor128_codec () {
83- return std:: make_unique<CompositeCodec<SIMDFastPFor<4 >, VariableByte>>();
89+ return make_unique<CompositeCodec<SIMDFastPFor<4 >, VariableByte>>();
8490}
8591std::unique_ptr<IntegerCODEC> simdfastpfor256_codec () {
86- return std:: make_unique<CompositeCodec<SIMDFastPFor<8 >, VariableByte>>();
92+ return make_unique<CompositeCodec<SIMDFastPFor<8 >, VariableByte>>();
8793}
8894std::unique_ptr<IntegerCODEC> simplepfor_codec () {
89- return std:: make_unique<CompositeCodec<SimplePFor<>, VariableByte>>();
95+ return make_unique<CompositeCodec<SimplePFor<>, VariableByte>>();
9096}
9197std::unique_ptr<IntegerCODEC> simdsimplepfor_codec () {
92- return std:: make_unique<CompositeCodec<SIMDSimplePFor<>, VariableByte>>();
98+ return make_unique<CompositeCodec<SIMDSimplePFor<>, VariableByte>>();
9399}
94100std::unique_ptr<IntegerCODEC> pfor_codec () {
95- return std:: make_unique<CompositeCodec<PFor, VariableByte>>();
101+ return make_unique<CompositeCodec<PFor, VariableByte>>();
96102}
97103std::unique_ptr<IntegerCODEC> simdpfor_codec () {
98- return std:: make_unique<CompositeCodec<SIMDPFor, VariableByte>>();
104+ return make_unique<CompositeCodec<SIMDPFor, VariableByte>>();
99105}
100106std::unique_ptr<IntegerCODEC> pfor2008_codec () {
101- return std:: make_unique<CompositeCodec<PFor2008, VariableByte>>();
107+ return make_unique<CompositeCodec<PFor2008, VariableByte>>();
102108}
103109std::unique_ptr<IntegerCODEC> simdnewpfor_codec () {
104- return std:: make_unique<CompositeCodec<SIMDNewPFor<4 , Simple16<false >>, VariableByte>>();
110+ return make_unique<CompositeCodec<SIMDNewPFor<4 , Simple16<false >>, VariableByte>>();
105111}
106112std::unique_ptr<IntegerCODEC> newpfor_codec () {
107- return std:: make_unique<CompositeCodec<NewPFor<4 , Simple16<false >>, VariableByte>>();
113+ return make_unique<CompositeCodec<NewPFor<4 , Simple16<false >>, VariableByte>>();
108114}
109115std::unique_ptr<IntegerCODEC> optpfor_codec () {
110- return std:: make_unique<CompositeCodec<OPTPFor<4 , Simple16<false >>, VariableByte>>();
116+ return make_unique<CompositeCodec<OPTPFor<4 , Simple16<false >>, VariableByte>>();
111117}
112118std::unique_ptr<IntegerCODEC> simdoptpfor_codec () {
113- return std:: make_unique<CompositeCodec<SIMDOPTPFor<4 , Simple16<false >>, VariableByte>>();
119+ return make_unique<CompositeCodec<SIMDOPTPFor<4 , Simple16<false >>, VariableByte>>();
114120}
115121std::unique_ptr<IntegerCODEC> varint_codec () {
116- return std:: make_unique<VariableByte>();
122+ return make_unique<VariableByte>();
117123}
118124std::unique_ptr<IntegerCODEC> vbyte_codec () {
119- return std:: make_unique<VByte>();
125+ return make_unique<VByte>();
120126}
121127std::unique_ptr<IntegerCODEC> maskedvbyte_codec () {
122- return std:: make_unique<MaskedVByte>();
128+ return make_unique<MaskedVByte>();
123129}
124130std::unique_ptr<IntegerCODEC> streamvbyte_codec () {
125- return std:: make_unique<StreamVByte>();
131+ return make_unique<StreamVByte>();
126132}
127133std::unique_ptr<IntegerCODEC> varintgb_codec () {
128- return std:: make_unique<VarIntGB<>>();
134+ return make_unique<VarIntGB<>>();
129135}
130136std::unique_ptr<IntegerCODEC> simple16_codec () {
131- return std:: make_unique<Simple16<true >>();
137+ return make_unique<Simple16<true >>();
132138}
133139std::unique_ptr<IntegerCODEC> simple9_codec () {
134- return std:: make_unique<Simple9<true >>();
140+ return make_unique<Simple9<true >>();
135141}
136142std::unique_ptr<IntegerCODEC> simple9_rle_codec () {
137- return std:: make_unique<Simple9_RLE<true >>();
143+ return make_unique<Simple9_RLE<true >>();
138144}
139145std::unique_ptr<IntegerCODEC> simple8b_codec () {
140- return std:: make_unique<Simple8b<true >>();
146+ return make_unique<Simple8b<true >>();
141147}
142148std::unique_ptr<IntegerCODEC> simple8b_rle_codec () {
143- return std:: make_unique<Simple8b_RLE<true >>();
149+ return make_unique<Simple8b_RLE<true >>();
144150}
145151#ifdef VARINTG8IU_H__
146152std::unique_ptr<IntegerCODEC> varintg8iu_codec () {
147- return std:: make_unique<VarIntG8IU>();
153+ return make_unique<VarIntG8IU>();
148154}
149155#endif
150156#ifdef USESNAPPY
151157std::unique_ptr<IntegerCODEC> snappy_codec () {
152- return std:: make_unique<JustSnappy>();
158+ return make_unique<JustSnappy>();
153159}
154160#endif
155161std::unique_ptr<IntegerCODEC> simdbinarypacking_codec () {
156- return std:: make_unique<CompositeCodec<SIMDBinaryPacking, VariableByte>>();
162+ return make_unique<CompositeCodec<SIMDBinaryPacking, VariableByte>>();
157163}
158164std::unique_ptr<IntegerCODEC> simdgroupsimple_codec () {
159- return std:: make_unique<CompositeCodec<SIMDGroupSimple<false , false >, VariableByte>>();
165+ return make_unique<CompositeCodec<SIMDGroupSimple<false , false >, VariableByte>>();
160166}
161167std::unique_ptr<IntegerCODEC> simdgroupsimple_ringbuf_codec () {
162- return std:: make_unique<CompositeCodec<SIMDGroupSimple<true , true >, VariableByte>>();
168+ return make_unique<CompositeCodec<SIMDGroupSimple<true , true >, VariableByte>>();
163169}
164170std::unique_ptr<IntegerCODEC> copy_codec () {
165- return std:: make_unique<JustCopy>();
171+ return make_unique<JustCopy>();
166172}
167173
168174static CodecMap initializefactory () {
0 commit comments