Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed allocating buffers above 2GB. #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ Retrieve the platform info as above for the specific platform selected using `co

Create an OpenCL program using the `context.createProgram()` method of the context object. This returns a promise that resolves to an OpenCL compiled kernel for an OpenCL _program_ as a program object.

```Javascript
await context.initialise();
```

After creating the context, initialize the context.

```Javascript
const progPromise = context.createProgram(kernel);
progPromise.then(program => ..., console.error);
Expand Down
4 changes: 2 additions & 2 deletions src/noden_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ napi_value createBuffer(napi_env env, napi_callback_info info) {
delete c;
return nullptr;
}
int32_t paramSize;
status = napi_get_value_int32(env, args[0], &paramSize);
int64_t paramSize;
status = napi_get_value_int64(env, args[0], &paramSize);
CHECK_STATUS;
if (paramSize < 0) {
status = napi_throw_error(env, nullptr, "Size of the buffer cannot be negative.");
Expand Down