File tree 2 files changed +5
-23
lines changed 2 files changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -1813,34 +1813,20 @@ fn ChooseContextMap(
1813
1813
+ ShannonEntropy ( & two_prefix_histo[ 3 ..] , 3usize , & mut dummy) ;
1814
1814
entropy[ 3 ] = 0i32 as ( super :: util:: floatX ) ;
1815
1815
for i in 0usize ..3usize {
1816
- let _rhs = ShannonEntropy (
1816
+ entropy [ 3 ] + = ShannonEntropy (
1817
1817
& bigram_histo[ ( 3usize ) . wrapping_mul ( i) ..] ,
1818
1818
3usize ,
1819
1819
& mut dummy,
1820
1820
) ;
1821
- let _lhs = & mut entropy[ 3 ] ;
1822
- * _lhs += _rhs;
1823
1821
}
1824
1822
let total: usize = monogram_histo[ 0 ]
1825
1823
. wrapping_add ( monogram_histo[ 1 ] )
1826
1824
. wrapping_add ( monogram_histo[ 2 ] ) as usize ;
1827
1825
0i32 ;
1828
1826
entropy[ 0 ] = 1.0 as super :: util:: floatX / total as ( super :: util:: floatX ) ;
1829
- {
1830
- let _rhs = entropy[ 0 ] ;
1831
- let _lhs = & mut entropy[ 1 ] ;
1832
- * _lhs *= _rhs;
1833
- }
1834
- {
1835
- let _rhs = entropy[ 0 ] ;
1836
- let _lhs = & mut entropy[ 2 ] ;
1837
- * _lhs *= _rhs;
1838
- }
1839
- {
1840
- let _rhs = entropy[ 0 ] ;
1841
- let _lhs = & mut entropy[ 3 ] ;
1842
- * _lhs *= _rhs;
1843
- }
1827
+ entropy[ 1 ] *= entropy[ 0 ] ;
1828
+ entropy[ 2 ] *= entropy[ 0 ] ;
1829
+ entropy[ 3 ] *= entropy[ 0 ] ;
1844
1830
if quality < 7i32 {
1845
1831
entropy[ 3 ] = entropy[ 1 ] * 10i32 as ( super :: util:: floatX ) ;
1846
1832
}
Original file line number Diff line number Diff line change @@ -722,11 +722,7 @@ fn ContextBlockSplitterFinishBlock<
722
722
) ;
723
723
combined_entropy[ jx] =
724
724
BitsEntropy ( combined_histo. slice ( ) [ jx] . slice ( ) , xself. alphabet_size_ ) ;
725
- {
726
- let _rhs = combined_entropy[ jx] - entropy[ i] - xself. last_entropy_ [ jx] ;
727
- let _lhs = & mut diff[ j] ;
728
- * _lhs += _rhs;
729
- }
725
+ diff[ j] += combined_entropy[ jx] - entropy[ i] - xself. last_entropy_ [ jx] ;
730
726
}
731
727
j = j. wrapping_add ( 1 ) ;
732
728
}
You can’t perform that action at this time.
0 commit comments