Comments (4)
This could indeed be useful. Please see the discussion on #6 though. Portability is very important here, so a good design is important. I welcome pull requests. Thanks!
from hemi.
I'm a bit torn on whether to look at this from the CUDA side or the host. I suspect it would be easier to use the math function names. This way, the functionality is clear (especially w/r/t rounding). Going the other way (from functions in to API is more natural to program in, but there's a pile of very specific functions with different rounding behaviors.
Right now, I've got everything as templated inline functions. Interesting side effect is that when the compiler is evaluating what template to use when the result of ?: is being passed to a function, the output is a bit weird when the types differ slightly (like a signed/unsigned int). It's fixable via typecasting, though.
On a related note, is there a preference as to a framework to use for writing testcases for some of these additions to Hemi?
from hemi.
See #10 for a pull request for this.
from hemi.
I would probably use google test, BTW (haven't looked at pull request yet).
from hemi.
Related Issues (16)
- Problems with making HEMI_DEFINE_CONSTANT static on host HOT 1
- Problems with HEMI_DEV_CALLABLE_INLINE static linkage
- Use inline instead of __forceinline__
- Make HEMI_DEV_ALIGN macro more flexible for non CUDACC path HOT 1
- host implementations of atomic functions? HOT 6
- Test framework of choice for project? HOT 5
- Adding support for CMake HOT 2
- range.hpp in VS2013 HOT 2
- grid_stride_range and parallel_for want explicit cast betwen int and size_t HOT 3
- (feat req) OpenMP acceleration in parallel_for HOT 2
- Use HEMI_LAMBDAs as return values of host functions? HOT 1
- Visual Studio x64
- How to get result type of device lambda ?
- Hello World with hemi::Array doesn't work, but doesn't error either HOT 1
- [Request] Runtime configuration choice of CPU or GPU HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hemi.