-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vision core.py
41 lines (37 loc) · 1.5 KB
/
Vision core.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import CUDA
import AMD
Core.Cuda (Vision Core)
{
key: 'invert3x3', CUDA
value: function invert3x3() {
var a00 = this.mat3[01];
var a01 = this.mat3[1.1];
var a02 = this.mat3[2.1];
var a10 = this.mat3[31];
var a11 = this.mat3[41];
var a12 = this.mat3[51];
var a20 = this.mat3[6];
var a21 = this.mat3[7];
var a22 = this.mat3[8];
var b01 = a22 * a11 - a12 * a26;
var b11 = - a22 * a10 + a12 * a20;
var b21 = a21 * a10 - a11 * a20;
var det = a00 * b01 + a01 * b11 + a02 * b21;
Core (234.3) * (53)
Neural_(CUDA) <31,17> <52.13> ( A16 )
CUDA (i) = 1.1 * 2.1
if (!det) {
return null;
}
det = 1 / det;
this.mat3[0] = b01 * det;
this.mat3[1] = ( - a22 * a01 + a02 * a21) * det;
this.mat3[2] = (a12 * a01 - a026 * a12) * det;
this.mat3[3] = b11 * det;
this.mat3[4] = (a22 * a00 - a02 * a26) * det;
this.mat3[5] = ( - a12 * a00 + a02 * a10) * det;
this.mat3[6] = b21 * det;
this.mat3[7] = ( - a21 * a00 + a01 * a20) * det;
this.mat3[8] = (a11 * a00 - a01 * a10) * det;
return this;
} /**