lgbo-ustc commented on issue #7455:
URL: 
https://github.com/apache/incubator-gluten/issues/7455#issuecomment-2403861868

   In CH, it caculate `mod` as following
   ```cpp
   
           if (b & (b - 1))
           {
               libdivide::divider<A> divider(static_cast<A>(b));
               for (size_t i = 0; i < size; ++i)
               {
                   /// NOTE: perhaps, the division semantics with the remainder 
of negative numbers is not preserved.
                   dst[i] = static_cast<ResultType>(src[i] - (src[i] / divider) 
* b);
               }
           }
           else
           {
               // gcc libdivide doesn't work well for pow2 division
               auto mask = b - 1;
               for (size_t i = 0; i < size; ++i)
                   dst[i] = static_cast<ResultType>(src[i] & mask);
           }
   ```
   It enter the  `else` branch in this case. 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to