Fix arithmetic exception when pass an empty mat with IPP option on.
Merge pull request #3135 from thorikawa:fix-arithmetic-exception-with-ipp