Type script support#2
Conversation
|
@lu4 thanks for the PR! I'd be happy to merge this into my fork's master branch, but I'm not sure how much good that'll do you. I'm starting a new job at nvidia tomorrow, and I don't think I'll be doing much OpenCL here soon... but hit me up if you want to collaborate on a native node-cuda module :-) |
| Nan::Set(target, JS_STR("v12"), Nan::True()); | ||
| #else | ||
| Nan::Set(target, JS_STR("CL_VERSION_1_2" ), Nan::False()); | ||
| Nan::Set(target, JS_STR("v12"), Nan::False()); |
There was a problem hiding this comment.
@lu4 any particular reason these were renamed? In general I'd be happy to merge this PR, but I think we should avoid changing things in the public API unless there's a good reason.
| Nan::Set(arr, 0, JS_INT((uint32_t) (param_value>>32))); // hi | ||
| Nan::Set(arr, 1, JS_INT((uint32_t) (param_value & 0xffffffff))); // lo | ||
| info.GetReturnValue().Set(arr); | ||
| info.GetReturnValue().Set(JS_INT((uint32_t) (param_value >> 10))); |
There was a problem hiding this comment.
Changing the unit means this API doesn't conform to the OpenCL spec, and I worry the right shift will lead to precision loss on certain devices. What's wrong with returning the long as a pair of lo,hi 32-bit numbers? They can very easily be turned into a bigint in JS now days.
Hey @trxcllnt ! Checkout my changes with TypeScript support. I was able to cover whole OpenCL 1.0-2.0 spec typings and introduced several bug fixes, maybe it'll be useful for you.
Be aware there are minor interface changes that are not backward compatible...
Cheers!