|
1 | | -use fastpfor::{cpp, rust}; |
| 1 | +use fastpfor::{AnyLenCodec, cpp, rust}; |
2 | 2 |
|
3 | | -pub type BoxedCppCodec = Box<dyn cpp::Codec32>; |
| 3 | +pub type BoxedCppCodec = Box<dyn AnyLenCodec>; |
4 | 4 |
|
5 | 5 | #[derive(arbitrary::Arbitrary)] |
6 | 6 | pub struct FuzzInput<C> { |
@@ -77,42 +77,43 @@ pub enum CppCodec { |
77 | 77 |
|
78 | 78 | impl From<CppCodec> for BoxedCppCodec { |
79 | 79 | fn from(codec: CppCodec) -> Self { |
80 | | - use cpp::*; |
81 | 80 | match codec { |
82 | | - CppCodec::BP32 => Box::new(BP32Codec::default()), |
83 | | - CppCodec::Copy => Box::new(CopyCodec::default()), |
84 | | - CppCodec::FastBinaryPacking8 => Box::new(FastBinaryPacking8Codec::default()), |
85 | | - CppCodec::FastPFor128 => Box::new(FastPFor128Codec::default()), |
86 | | - CppCodec::FastPFor256 => Box::new(FastPFor256Codec::default()), |
87 | | - CppCodec::FastBinaryPacking16 => Box::new(FastBinaryPacking16Codec::default()), |
88 | | - CppCodec::FastBinaryPacking32 => Box::new(FastBinaryPacking32Codec::default()), |
89 | | - CppCodec::MaskedVByte => Box::new(MaskedVByteCodec::default()), |
90 | | - CppCodec::NewPFor => Box::new(NewPForCodec::default()), |
91 | | - CppCodec::OptPFor => Box::new(OptPForCodec::default()), |
92 | | - CppCodec::PFor2008 => Box::new(PFor2008Codec::default()), |
93 | | - CppCodec::PFor => Box::new(PForCodec::default()), |
94 | | - CppCodec::SimdBinaryPacking => Box::new(SimdBinaryPackingCodec::default()), |
95 | | - CppCodec::SimdFastPFor128 => Box::new(SimdFastPFor128Codec::default()), |
96 | | - CppCodec::SimdFastPFor256 => Box::new(SimdFastPFor256Codec::default()), |
97 | | - CppCodec::SimdGroupSimple => Box::new(SimdGroupSimpleCodec::default()), |
98 | | - CppCodec::SimdGroupSimpleRingBuf => Box::new(SimdGroupSimpleRingBufCodec::default()), |
99 | | - CppCodec::SimdNewPFor => Box::new(SimdNewPForCodec::default()), |
100 | | - CppCodec::SimdOptPFor => Box::new(SimdOptPForCodec::default()), |
101 | | - CppCodec::SimdPFor => Box::new(SimdPForCodec::default()), |
102 | | - CppCodec::SimdSimplePFor => Box::new(SimdSimplePForCodec::default()), |
103 | | - // CppCodec::Simple16 => Box::new(Simple16Codec::default()), |
104 | | - // CppCodec::Simple8b => Box::new(Simple8bCodec::default()), |
105 | | - // CppCodec::Simple8bRle => Box::new(Simple8bRleCodec::default()), |
106 | | - // CppCodec::Simple9 => Box::new(Simple9Codec::default()), |
107 | | - // CppCodec::Simple9Rle => Box::new(Simple9RleCodec::default()), |
108 | | - // CppCodec::SimplePFor => Box::new(SimplePForCodec::default()), |
109 | | - // CppCodec::Snappy => Box::new(SnappyCodec::default()), |
110 | | - CppCodec::StreamVByte => Box::new(StreamVByteCodec::default()), |
111 | | - CppCodec::VByte => Box::new(VByteCodec::default()), |
112 | | - CppCodec::VarInt => Box::new(VarIntCodec::default()), |
113 | | - // CppCodec::VarIntG8iu => Box::new(VarIntG8iuCodec::default()), |
114 | | - CppCodec::VarIntGb => Box::new(VarIntGbCodec::default()), |
115 | | - // CppCodec::VsEncoding => Box::new(VsEncodingCodec::default()), |
| 81 | + CppCodec::BP32 => Box::new(cpp::BP32Codec::default()), |
| 82 | + CppCodec::Copy => Box::new(cpp::CopyCodec::default()), |
| 83 | + CppCodec::FastBinaryPacking8 => Box::new(cpp::FastBinaryPacking8Codec::default()), |
| 84 | + CppCodec::FastPFor128 => Box::new(cpp::FastPFor128Codec::default()), |
| 85 | + CppCodec::FastPFor256 => Box::new(cpp::FastPFor256Codec::default()), |
| 86 | + CppCodec::FastBinaryPacking16 => Box::new(cpp::FastBinaryPacking16Codec::default()), |
| 87 | + CppCodec::FastBinaryPacking32 => Box::new(cpp::FastBinaryPacking32Codec::default()), |
| 88 | + CppCodec::MaskedVByte => Box::new(cpp::MaskedVByteCodec::default()), |
| 89 | + CppCodec::NewPFor => Box::new(cpp::NewPForCodec::default()), |
| 90 | + CppCodec::OptPFor => Box::new(cpp::OptPForCodec::default()), |
| 91 | + CppCodec::PFor2008 => Box::new(cpp::PFor2008Codec::default()), |
| 92 | + CppCodec::PFor => Box::new(cpp::PForCodec::default()), |
| 93 | + CppCodec::SimdBinaryPacking => Box::new(cpp::SimdBinaryPackingCodec::default()), |
| 94 | + CppCodec::SimdFastPFor128 => Box::new(cpp::SimdFastPFor128Codec::default()), |
| 95 | + CppCodec::SimdFastPFor256 => Box::new(cpp::SimdFastPFor256Codec::default()), |
| 96 | + CppCodec::SimdGroupSimple => Box::new(cpp::SimdGroupSimpleCodec::default()), |
| 97 | + CppCodec::SimdGroupSimpleRingBuf => { |
| 98 | + Box::new(cpp::SimdGroupSimpleRingBufCodec::default()) |
| 99 | + } |
| 100 | + CppCodec::SimdNewPFor => Box::new(cpp::SimdNewPForCodec::default()), |
| 101 | + CppCodec::SimdOptPFor => Box::new(cpp::SimdOptPForCodec::default()), |
| 102 | + CppCodec::SimdPFor => Box::new(cpp::SimdPForCodec::default()), |
| 103 | + CppCodec::SimdSimplePFor => Box::new(cpp::SimdSimplePForCodec::default()), |
| 104 | + // CppCodec::Simple16 => Box::new(cpp::Simple16Codec::default()), |
| 105 | + // CppCodec::Simple8b => Box::new(cpp::Simple8bCodec::default()), |
| 106 | + // CppCodec::Simple8bRle => Box::new(cpp::Simple8bRleCodec::default()), |
| 107 | + // CppCodec::Simple9 => Box::new(cpp::Simple9Codec::default()), |
| 108 | + // CppCodec::Simple9Rle => Box::new(cpp::Simple9RleCodec::default()), |
| 109 | + // CppCodec::SimplePFor => Box::new(cpp::SimplePForCodec::default()), |
| 110 | + // CppCodec::Snappy => Box::new(cpp::SnappyCodec::default()), |
| 111 | + CppCodec::StreamVByte => Box::new(cpp::StreamVByteCodec::default()), |
| 112 | + CppCodec::VByte => Box::new(cpp::VByteCodec::default()), |
| 113 | + CppCodec::VarInt => Box::new(cpp::VarIntCodec::default()), |
| 114 | + // CppCodec::VarIntG8iu => Box::new(cpp::VarIntG8iuCodec::default()), |
| 115 | + CppCodec::VarIntGb => Box::new(cpp::VarIntGbCodec::default()), |
| 116 | + // CppCodec::VsEncoding => Box::new(cpp::VsEncodingCodec::default()), |
116 | 117 | } |
117 | 118 | } |
118 | 119 | } |
|
0 commit comments