@@ -101,14 +101,15 @@ void ZeroSuppressingU5::ZSReader<ARR,OFF,GET>::reset() {
101
101
102
102
103
103
template <typename ARR, typename OFF, typename SET>
104
- void ZSWriter<ARR,OFF,SET>::setup(ARR array, OFF limit) {
104
+ // ## error: invalid use of incomplete type 'class ZeroSuppressingU5::ZSWriter<ARR, OFF, SET>'
105
+ void ZeroSuppressingU5::ZSWriter<ARR,OFF,SET>::setup(ARR array, OFF limit) {
105
106
_sticky_passthrough = false ;
106
107
_w.setup (array, limit);
107
108
reset ();
108
109
}
109
110
110
111
template <typename ARR, typename OFF, typename SET>
111
- void ZSWriter<ARR,OFF,SET>::reset() {
112
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::reset() {
112
113
_w.reset ();
113
114
_suppressed_zeroes = 0 ;
114
115
_zero_mask_length = 0 ;
@@ -121,20 +122,19 @@ void ZSWriter<ARR,OFF,SET>::reset() {
121
122
}
122
123
123
124
template <typename ARR, typename OFF, typename SET>
124
- void ZSWriter<ARR,OFF,SET>::grow_array(ARR array, OFF limit) {
125
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::grow_array(ARR array, OFF limit) {
125
126
_w.grow_array (array, limit);
126
127
}
127
128
128
129
template <typename ARR, typename OFF, typename SET>
129
- void ZSWriter<ARR,OFF,SET>::accept_end_byte() {
130
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::accept_end_byte() {
130
131
commit (false , false );
131
132
_w.accept_end_byte ();
132
133
set_clean_or_passthrough ();
133
134
}
134
135
135
136
template <typename ARR, typename OFF, typename SET>
136
-
137
- OFF ZSWriter<ARR,OFF,SET>::advance_position(OFF start, int count) {
137
+ OFF ZeroSuppressingU5::ZSWriter<ARR,OFF,SET>::advance_position(OFF start, int count) {
138
138
ARR arr = array ();
139
139
OFF pos = start;
140
140
int rem = count;
@@ -153,7 +153,7 @@ OFF ZSWriter<ARR,OFF,SET>::advance_position(OFF start, int count) {
153
153
int ZSWriter_extra_sanity_checks = 1000 ;
154
154
155
155
template <typename ARR, typename OFF, typename SET>
156
- bool ZSWriter<ARR,OFF,SET>::sanity_checks() {
156
+ bool ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::sanity_checks() {
157
157
const int zmlen = _zero_mask_length;
158
158
const int bklen = _block_length;
159
159
if (is_passthrough ()) {
@@ -190,7 +190,7 @@ bool ZSWriter<ARR,OFF,SET>::sanity_checks() {
190
190
}
191
191
192
192
template <typename ARR, typename OFF, typename SET>
193
- void ZSWriter<ARR,OFF,SET>::digest_multiple_uints(OFF start_pos, int count) {
193
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::digest_multiple_uints(OFF start_pos, int count) {
194
194
assert (count >= 1 && count <= 3 , " " );
195
195
uint32_t zm = 0 ;
196
196
OFF pos = start_pos;
@@ -210,7 +210,7 @@ void ZSWriter<ARR,OFF,SET>::digest_multiple_uints(OFF start_pos, int count) {
210
210
}
211
211
212
212
template <typename ARR, typename OFF, typename SET>
213
- void ZSWriter<ARR,OFF,SET>::digest_uint_mask(uint32_t more_zm, int more_zm_len, OFF start_pos) {
213
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::digest_uint_mask(uint32_t more_zm, int more_zm_len, OFF start_pos) {
214
214
if (is_passthrough ()) {
215
215
return ; // no more compression, but it's OK to keep accumulating
216
216
}
@@ -252,7 +252,7 @@ void ZSWriter<ARR,OFF,SET>::digest_uint_mask(uint32_t more_zm, int more_zm_len,
252
252
}
253
253
254
254
template <typename ARR, typename OFF, typename SET>
255
- void ZSWriter<ARR,OFF,SET>::expand_current_block(int trim) {
255
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::expand_current_block(int trim) {
256
256
// current block (middle area) takes leading items from zero mask area
257
257
assert (trim > 0 && trim <= _zero_mask_length, " " );
258
258
assert (have_zero_mask (), " " );
@@ -268,7 +268,7 @@ void ZSWriter<ARR,OFF,SET>::expand_current_block(int trim) {
268
268
}
269
269
270
270
template <typename ARR, typename OFF, typename SET>
271
- void ZSWriter<ARR,OFF,SET>::drain_zero_mask(int target_zero_mask_length) {
271
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::drain_zero_mask(int target_zero_mask_length) {
272
272
// Drain the zero mask area until it is at most the target size.
273
273
const int zml = _zero_mask_length;
274
274
if (zml <= target_zero_mask_length) return ;
@@ -316,7 +316,7 @@ void ZSWriter<ARR,OFF,SET>::drain_zero_mask(int target_zero_mask_length) {
316
316
}
317
317
318
318
template <typename ARR, typename OFF, typename SET>
319
- void ZSWriter<ARR,OFF,SET>::do_compression(uint32_t best_zm) {
319
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::do_compression(uint32_t best_zm) {
320
320
// Act on the chosen zero mask.
321
321
assert (best_zm != 0 , " " ); // must have something to compress
322
322
assert ((best_zm & _zero_mask) == best_zm, " subset mask" );
@@ -428,7 +428,7 @@ void ZSWriter<ARR,OFF,SET>::do_compression(uint32_t best_zm) {
428
428
}
429
429
430
430
template <typename ARR, typename OFF, typename SET>
431
- void ZSWriter<ARR,OFF,SET>::emit_block_command(bool use_indefinite_length) {
431
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::emit_block_command(bool use_indefinite_length) {
432
432
assert (!have_zero_mask (), " " );
433
433
assert (have_current_block (), " " );
434
434
assert (sanity_checks (), " " );
@@ -462,7 +462,7 @@ void ZSWriter<ARR,OFF,SET>::emit_block_command(bool use_indefinite_length) {
462
462
}
463
463
464
464
template <typename ARR, typename OFF, typename SET>
465
- void ZSWriter<ARR,OFF,SET>::emit_zero_mask_command(uint32_t best_zm) {
465
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::emit_zero_mask_command(uint32_t best_zm) {
466
466
assert (is_clean (), " " );
467
467
assert (sanity_checks (), " " );
468
468
// Emit the zero mask command, including its buffered payload data.
@@ -471,7 +471,7 @@ void ZSWriter<ARR,OFF,SET>::emit_zero_mask_command(uint32_t best_zm) {
471
471
}
472
472
473
473
template <typename ARR, typename OFF, typename SET>
474
- void ZSWriter<ARR,OFF,SET>::commit(bool require_clean,
474
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::commit(bool require_clean,
475
475
bool require_passthrough) {
476
476
assert (!require_clean || !require_passthrough, " " ); // not both
477
477
if (is_passthrough ()) { // already passing through uncompressed
@@ -498,7 +498,7 @@ void ZSWriter<ARR,OFF,SET>::commit(bool require_clean,
498
498
}
499
499
500
500
template <typename ARR, typename OFF, typename GET>
501
- void ZSReader<ARR,OFF,GET>::print_on(outputStream* st) {
501
+ void ZeroSuppressingU5:: ZSReader<ARR,OFF,GET>::print_on(outputStream* st) {
502
502
UNSIGNED5::Reader<ARR,OFF,GET> r (_r.array (), _r.limit ());
503
503
OFF pos = _r.position ();
504
504
st->print (" CR" );
@@ -568,7 +568,7 @@ void ZSReader<ARR,OFF,GET>::print_on(outputStream* st) {
568
568
}
569
569
570
570
template <typename ARR, typename OFF, typename SET>
571
- void ZSWriter<ARR,OFF,SET>::print_on(outputStream* st) {
571
+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::print_on(outputStream* st) {
572
572
ZSReader<ARR,OFF,SET> r (_w.array (), _w.position ());
573
573
if (is_passthrough ()) r.set_passthrough ();
574
574
st->print (" CW[" );
@@ -880,10 +880,4 @@ print_on(outputStream* st, int count,
880
880
881
881
PRAGMA_DIAG_POP
882
882
883
- // Explicit instantiation for supported types.
884
- template void UNSIGNED5::Reader<char *,int >::
885
- print_on (outputStream* st, int count, const char * left, const char * right);
886
- template void UNSIGNED5::Reader<u1*,int >::
887
- print_on (outputStream* st, int count, const char * left, const char * right);
888
- template void UNSIGNED5::Reader<address,size_t >::
889
- print_on (outputStream* st, int count, const char * left, const char * right);
883
+ // ## error: duplicate explicit instantiation
0 commit comments