@@ -101,14 +101,15 @@ void ZeroSuppressingU5::ZSReader<ARR,OFF,GET>::reset() {
101101
102102
103103template <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) {
105106 _sticky_passthrough = false ;
106107 _w.setup (array, limit);
107108 reset ();
108109}
109110
110111template <typename ARR, typename OFF, typename SET>
111- void ZSWriter<ARR,OFF,SET>::reset() {
112+ void ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::reset() {
112113 _w.reset ();
113114 _suppressed_zeroes = 0 ;
114115 _zero_mask_length = 0 ;
@@ -121,20 +122,19 @@ void ZSWriter<ARR,OFF,SET>::reset() {
121122}
122123
123124template <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) {
125126 _w.grow_array (array, limit);
126127}
127128
128129template <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() {
130131 commit (false , false );
131132 _w.accept_end_byte ();
132133 set_clean_or_passthrough ();
133134}
134135
135136template <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) {
138138 ARR arr = array ();
139139 OFF pos = start;
140140 int rem = count;
@@ -153,7 +153,7 @@ OFF ZSWriter<ARR,OFF,SET>::advance_position(OFF start, int count) {
153153int ZSWriter_extra_sanity_checks = 1000 ;
154154
155155template <typename ARR, typename OFF, typename SET>
156- bool ZSWriter<ARR,OFF,SET>::sanity_checks() {
156+ bool ZeroSuppressingU5:: ZSWriter<ARR,OFF,SET>::sanity_checks() {
157157 const int zmlen = _zero_mask_length;
158158 const int bklen = _block_length;
159159 if (is_passthrough ()) {
@@ -190,7 +190,7 @@ bool ZSWriter<ARR,OFF,SET>::sanity_checks() {
190190}
191191
192192template <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) {
194194 assert (count >= 1 && count <= 3 , " " );
195195 uint32_t zm = 0 ;
196196 OFF pos = start_pos;
@@ -210,7 +210,7 @@ void ZSWriter<ARR,OFF,SET>::digest_multiple_uints(OFF start_pos, int count) {
210210}
211211
212212template <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) {
214214 if (is_passthrough ()) {
215215 return ; // no more compression, but it's OK to keep accumulating
216216 }
@@ -252,7 +252,7 @@ void ZSWriter<ARR,OFF,SET>::digest_uint_mask(uint32_t more_zm, int more_zm_len,
252252}
253253
254254template <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) {
256256 // current block (middle area) takes leading items from zero mask area
257257 assert (trim > 0 && trim <= _zero_mask_length, " " );
258258 assert (have_zero_mask (), " " );
@@ -268,7 +268,7 @@ void ZSWriter<ARR,OFF,SET>::expand_current_block(int trim) {
268268}
269269
270270template <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) {
272272 // Drain the zero mask area until it is at most the target size.
273273 const int zml = _zero_mask_length;
274274 if (zml <= target_zero_mask_length) return ;
@@ -316,7 +316,7 @@ void ZSWriter<ARR,OFF,SET>::drain_zero_mask(int target_zero_mask_length) {
316316}
317317
318318template <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) {
320320 // Act on the chosen zero mask.
321321 assert (best_zm != 0 , " " ); // must have something to compress
322322 assert ((best_zm & _zero_mask) == best_zm, " subset mask" );
@@ -428,7 +428,7 @@ void ZSWriter<ARR,OFF,SET>::do_compression(uint32_t best_zm) {
428428}
429429
430430template <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) {
432432 assert (!have_zero_mask (), " " );
433433 assert (have_current_block (), " " );
434434 assert (sanity_checks (), " " );
@@ -462,7 +462,7 @@ void ZSWriter<ARR,OFF,SET>::emit_block_command(bool use_indefinite_length) {
462462}
463463
464464template <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) {
466466 assert (is_clean (), " " );
467467 assert (sanity_checks (), " " );
468468 // 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) {
471471}
472472
473473template <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,
475475 bool require_passthrough) {
476476 assert (!require_clean || !require_passthrough, " " ); // not both
477477 if (is_passthrough ()) { // already passing through uncompressed
@@ -498,7 +498,7 @@ void ZSWriter<ARR,OFF,SET>::commit(bool require_clean,
498498}
499499
500500template <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) {
502502 UNSIGNED5::Reader<ARR,OFF,GET> r (_r.array (), _r.limit ());
503503 OFF pos = _r.position ();
504504 st->print (" CR" );
@@ -568,7 +568,7 @@ void ZSReader<ARR,OFF,GET>::print_on(outputStream* st) {
568568}
569569
570570template <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) {
572572 ZSReader<ARR,OFF,SET> r (_w.array (), _w.position ());
573573 if (is_passthrough ()) r.set_passthrough ();
574574 st->print (" CW[" );
@@ -880,10 +880,4 @@ print_on(outputStream* st, int count,
880880
881881PRAGMA_DIAG_POP
882882
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