You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/26 12:43:52 UTC

[GitHub] [arrow-rs] alamb opened a new issue #161: Array sum result is wrong with remainder fields when simd is on

alamb opened a new issue #161:
URL: https://github.com/apache/arrow-rs/issues/161


   *Note*: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-11051
   
   Minimal example
   
    
   {quote}use arrow::\{array::PrimitiveArray, datatypes::Int64Type};
   
   fn main() \{
        let mut s = vec![];
        for _ in 0..32  
         
        \{
            s.push(Some(1i64));         s.push(None);     
        }
        let v: PrimitiveArray<Int64Type> = s.into();
        dbg!(arrow::compute::sum(&v));
    }
     
   {quote}
    dependency
   {quote}arrow = \{version = "2", features = ["simd"]}
   {quote}
   The following code in `compute::sum` is wrong. The bit mask is checked reversed.
   {quote}            remainder.iter().enumerate().for_each(|(i, value)| \{
                    if remainder_bits & (1 << i) != 0  \{
   
                       remainder_sum = remainder_sum + *value;
   
                    }
   
               });
     
   {quote}


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-rs] alamb commented on issue #161: Array sum result is wrong with remainder fields when simd is on

Posted by GitBox <gi...@apache.org>.
alamb commented on issue #161:
URL: https://github.com/apache/arrow-rs/issues/161#issuecomment-826804813


   Comment from Jörn Horstmann(jhorstmann) @ 2021-01-01T10:11:26.248+0000:
   <pre>Hi [~niuzr], could you try the same with the latest master branch? There were some changes and also a bugfix how the vector masking is calculated after the 2.0 release in ARROW-10216.</pre>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org