hemi icon indicating copy to clipboard operation
hemi copied to clipboard

Partial math function support in in the hemi:: namespace and some tests

Open lordofhyphens opened this issue 10 years ago • 3 comments

Added a tests folder for the math function support. There's a failing assert on the device for double-precision round() (internal function), at least for the case of 0^1 = 0.

Everything's defined as a inline function and should be usable just as their std:: counterparts. It also selects the single-precision versions when the input arguments are floats. We could probably improve on this behavior, but it'd probably need a global flipped in the hemi namespace or something similar.

I've tested it with CUDA 6 and g++ 4.8.

lordofhyphens avatar Jul 22 '14 19:07 lordofhyphens

Please make some changes.

  1. Indents should be 2 spaces, not tabs, as in hemi.h
  2. { and } get their own lines
  3. Use .cpp extension for C++ source files, not .cc

harrism avatar Jul 24 '14 00:07 harrism

Submitting a new pull request.

lordofhyphens avatar Jul 25 '14 17:07 lordofhyphens

Github is confusing. Sorry for the extra noise.

lordofhyphens avatar Jul 25 '14 17:07 lordofhyphens