This repository was archived by the owner on Jun 17, 2024. It is now read-only.
File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,11 @@ test "bitpack range" {
60
60
const fl = @import ("./fastlanez.zig" );
61
61
const BP = BitPacking (fl .FastLanez (u8 ));
62
62
63
- const W = 3 ;
63
+ const W = 6 ;
64
64
65
65
var ints : [1024 ]u8 = undefined ;
66
66
for (0.. 1024) | i | {
67
- ints [i ] = @intCast (i % 7 );
67
+ ints [i ] = @intCast (i % std . math . maxInt ( std . meta . Int ( .unsigned , W )) );
68
68
}
69
69
70
70
var packed_ints : [128 * W ]u8 = undefined ;
Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ pub fn FastLanez(comptime Element: type) type {
185
185
self .t += 1 ;
186
186
187
187
var tmp : MM1024 = undefined ;
188
- if (self .input_idx == 0 ) {
189
- tmp = load (input , 0 );
188
+ if (self .bit_idx % T == 0 ) {
189
+ tmp = load (input , self . input_idx );
190
190
self .input_idx += 1 ;
191
191
} else {
192
192
tmp = state ;
@@ -197,7 +197,7 @@ pub fn FastLanez(comptime Element: type) type {
197
197
198
198
var next : MM1024 = and_rshift (tmp , shift_bits , bitmask (mask_bits ));
199
199
200
- if (mask_bits != Width and self . input_idx < Width ) {
200
+ if (mask_bits != Width ) {
201
201
tmp = load (input , self .input_idx );
202
202
self .input_idx += 1 ;
203
203
You can’t perform that action at this time.
0 commit comments