コード例 #1
0
            public void Execute()
            {
                float exp = Hlsl.Exp(dword * row_major[ThreadIds.X]);
                float log = Hlsl.Log(1 + exp);

                row_major[ThreadIds.X] = log / dword + float2 + int2x2;
            }
コード例 #2
0
            public void Execute()
            {
                float exp  = Hlsl.Exp(cellData.distance * row_major[ThreadIds.X]);
                float log  = Hlsl.Log(1 + exp);
                float temp = log + cellData.dword + cellData.int2x2;

                row_major[ThreadIds.X] = log / dword + float2 + int2x2 + cbuffer.float2;
            }
コード例 #3
0
            public void Execute()
            {
                float exp = Hlsl.Exp(dword * row_major[ThreadIds.X]);
                float log = Hlsl.Log(1 + exp);

                float s1 = this.cos * exp * this.sin * log;
                float t1 = -this.sin * exp * this.cos * log;

                float s2 = s1 + this.intensity + Hlsl.Tan(s1 * this.scale);
                float t2 = t1 + this.intensity + Hlsl.Tan(t1 * this.scale);

                float u2 = this.cos * s2 - this.sin * t2;
                float v2 = this.sin * s2 - this.cos * t2;

                row_major[ThreadIds.X] = log / dword + float2 + int2x2 + u2 + v2;
            }
コード例 #4
0
 static float Sigmoid(float x) => 1 / (1 + Hlsl.Exp(-x));