You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code doesn't directly work on the GPU, because we can only _either_ read or write to arrays. Currently `filters` violates this. However, we could use MatrixLog to _help us_ (note, there is a little thinking that needs to take place) solve this issue by finding the algorithm that `filters` needs.
102
+
This code doesn't directly work on the GPU, because we can only _either_ read or write to arrays there. Currently `filters` violates this. However, we could use MatrixLog to _help us_ (note, there is a little thinking that needs to take place) solve this issue by finding the algorithm that `filters` needs.
91
103
92
104
2. Convert the code as follows and see the output below:
93
105
```js
@@ -110,7 +122,8 @@ for (let y = 0; y < 4; y++) {
110
122
for (let x =0; x <4; x++) {
111
123
let filterX = x <filter.length?0:1;
112
124
filters[filterY][filterX] += weights[y][x];
113
-
matrixLog.add('weights', filterX, filterY, x, y, weights[0].length, weights.length);
125
+
matrixLog
126
+
.add('weights', filterX, filterY, x, y, weights[0].length, weights.length);
0 commit comments