Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Gemfile.lock
.DS_Store
.backup_*/
vendor/bundle/
node_modules/
2 changes: 1 addition & 1 deletion binop.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* {inclusive, exclusive}-scans across a subgroup
*/

class BinOp {
export class BinOp {
constructor(args) {
// no defaults! if something is undefined, go with it
Object.assign(this, args);
Expand Down
36 changes: 36 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,42 @@ export class BasePrimitive {
registerBuffer(args: { label: string; buffer: any; device?: GPUDevice }): void;
}

export class Kernel {
label: string;
kernel: string | ((args?: { [key: string]: any }) => string);

constructor(
args:
| ((args?: { [key: string]: any }) => string)
| {
kernel: string | ((args?: { [key: string]: any }) => string);
label?: string;
[key: string]: any;
}
);

enabled(): boolean;
}

export class AllocateBuffer {
label: string;
size: number;

constructor(args: {
label: string;
size: number;
usage?: number;
[key: string]: any;
});
}

export class WriteGPUBuffer {
label: string;
cpuSource: any;

constructor(args: { label: string; cpuSource: any; [key: string]: any });
}

export class Buffer {
label: string;
device: GPUDevice;
Expand Down
60 changes: 60 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"main": "./index.mjs",
"types": "./index.d.ts",
"exports": {
".": "./index.mjs"
".": {
"types": "./index.d.ts",
"import": "./index.mjs"
}
},
"scripts": {
"test:node": "node examples/regression_node.mjs",
Expand All @@ -33,6 +36,7 @@
"datatype.mjs",
"LICENSE.txt"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/gridwise-js/gridwise.git"
Expand All @@ -48,7 +52,6 @@
"reduce",
"gpgpu"
],
"author": "",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/gridwise-js/gridwise/issues"
Expand Down
Loading