Questions tagged [gpu.js]

JavaScript compiler into shading language

It is a form of writing shading language (which can be understand by GPU) with JavaScript. Form of JS Internal DSL

https://github.com/gpujs/gpu.js

25 questions
0
votes
0 answers

gpu.js and number of GPU cores it is using

I am trying to understand this statement from GPU.js. I am trying to figure out how many GPU cores gpu.js can utilize in parallel? GPU these days can easily come with 1000+ cores. From the statement below, are we looking at 3 only cores?…
user325737
  • 31
  • 1
0
votes
1 answer

gpu.js with BigDecimal or float64array possible?

I am writing a mandelbrot-calculator with the help of gpu.js and till now, everything works perfectly fine. The only issue I am facing is, that the GPU only wants to compute 32-Bit floats. Or at least this is what the official docs are telling me.…
0
votes
1 answer

React asynchronously rendering multiple components with states

I'm trying to make use of GPU.js in a sample CRA React project. I'm trying to make a visible comparison between CPU & GPU calculations, but React "waits" for CPU calculations to finish before showing all results, despite them being in separate…
Christian
  • 124
  • 2
  • 11
0
votes
1 answer

How do I run this function with GPU.js?

I want to run this permutations function on GPU. function* permute(permutation) { var length = permutation.length; var c = Array(length).fill(0); var i = 1; var k; var p; yield permutation.slice(); while (i < length) { if (c[i] <…
karolis2017
  • 2,195
  • 8
  • 24
  • 49
0
votes
0 answers

Wrong values with using gpu.js

I use my code in modes 'dev', 'gpu' and 'cpu'. When I run up my code in 'dev' mode I had right number of results word 'more' in almost 100mb file. There is 259200 words 'more'. But when I run it up in 'gpu' or 'cpu' mode, I have only 3 results from…
0
votes
3 answers

Is there a better way of finding solution than using nested loops?

I am looking to speed up the process of testing all the combinations based on the nested loops in the piece of code included. I am currently stuck with JavaScript and NodeJS on Windows 10. Is there a way to compute this using GPU rather than…
Augeaz
  • 121
  • 1
  • 6
0
votes
2 answers

How to pass off heavy JavaScript math operations to GPU with GPU.js

Background I've built a little web based application that pops up windows to display your webcam(s). I wanted to add the ability to chroma key your feed and have been successful in getting several different algorithms working. The best algorithm I…
Blizzardengle
  • 992
  • 1
  • 17
  • 30
0
votes
1 answer

Using gpu.js for cellular automata

I'm trying to run 1D cellular automata using gpu.js, but it looks that my code without gpu.js is 20 times faster. I cannot understand where is the issue. The code below runs cellular automata for rule 30 starting from single one ON cell. The…
0
votes
1 answer

Why is conversion from an untyped array to Uint8ClampedArray so slow?

I've got a rendering pipeline where I'm trying out gpu.js as my shader mechanism. From what I can tell though, while gpu.js can take a typed array buffer as input, there's no way to output to a typed array. So to render the shaded result, I need to…
john doe
  • 547
  • 1
  • 6
  • 18
0
votes
1 answer

Algorithm for this gpu operation?

I'm using a library that allows computing large matrix operations on the GPU, gpu.js. What I'm trying to do is not really hard I don't think but I can't seem to begin to figure out the algorithm for it. Basically I have an array buffer stored as…
john doe
  • 547
  • 1
  • 6
  • 18
1
2