Skip to content

Commit 848f3ce

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 921dbbe + 64ce370 commit 848f3ce

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ A matrix log dependency utility. Useful for converting and testing algorithm beh
44

55
## Why?
66
GPU Principle: Your can only _write to_ or _read from_ Arrays (Textures).
7-
CPU Principle: You can read or right to arrays as you see fit.
87

9-
CPU Problem: Sometimes you'd like to convert your CPU code to GPU code.
8+
CPU Principle: You can read or write to arrays _as you see fit_.
9+
10+
GPU Problem: Sometimes you'd like to convert your CPU code to GPU code.
11+
1012
By strategically using MatrixLog as a logger in your CPU algorithms, you can see which points are dependent from your source arrays to your target arrays.
1113
This makes converting CPU code to run on GPU, using a utility like [GPU.js](http://gpu.rocks), much easier.
1214

@@ -161,7 +163,7 @@ width=2,height=2 width=4,height=4
161163
[ ][ ][*][*]
162164
```
163165

164-
3. Now we have enough logic to visibly see how to build out our algorythm that will work on the GPU. For `filters`@`x=0,y=0` we can see we need the values from `weights`@`x=0,y=0`,`x=1,y=0`,`x=0,y=1`, and `x=1,y=1`. Then to get `filters`@`x=1,y=0`, we seem to increment by to on `weights`. If we were to write a loop that emilates this behaviour, it'd look something like this:
166+
3. Now we have enough logic to visibly see how to build out our algorythm that will work on the GPU. For `filters`@`x=0,y=0` we can see we need the values from `weights`@`x=0,y=0`,`x=1,y=0`,`x=0,y=1`, and `x=1,y=1`. Then to get `filters`@`x=1,y=0`, we seem to increment by two on `weights`. If we were to write a loop that emilates this behaviour, it'd look something like this:
165167

166168
```js
167169
const filterHeight = 2;
@@ -247,4 +249,4 @@ console.log(filterKernel(filters, weights));// -> [ [ 14, 22 ], [ 46, 54 ] ]
247249

248250
## What benefits are there to using MatrixLog?
249251
1. Seeing is understanding
250-
2. Automated unit testing new GPU algorithm against already existing CPU code with an output that can be understood by humans.
252+
2. Automated unit testing new GPU algorithm against already existing CPU code with an output that can be understood by humans.

0 commit comments

Comments
 (0)