示例#1
0
        public static int RunTest()
        {
            Console.WriteLine($"SimpleArgsFunc returned {SimpleArgsFunc(-123, -4.3f, "Hello, test!")}");

            Console.WriteLine($"MixedStructFunc returned {MixedStructFunc(new MixedStruct(1, 1))}");

            Console.WriteLine($"LargeStructFunc returned {LargeStructFunc(new LargeStruct(0, 0, 1, 1, 2, 2, 3, 3))}");

            Console.WriteLine($"IntegerStructFunc returned {IntegerStructFunc(new IntegerStruct(14, 256))}");

            var fp32x2 = new Fp32x2Struct(1.2f, 3.5f);
            var fp32x3 = new Fp32x3Struct(6.7f, 10.11f, 13.14f);
            var fp32x4 = new Fp32x4Struct(15.17f, 19.21f, 22.23f, 26.29f);

            Console.WriteLine($"Fp32x2StructFunc returned {Fp32x2StructFunc(fp32x2)}");

            Console.WriteLine($"Fp32x2StructFp32x3StructFunc returned {Fp32x2StructFp32x3StructFunc(fp32x2, fp32x3)}");

            Console.WriteLine($"Fp32x3StructFunc returned {Fp32x3StructFunc(fp32x3)}");

            Console.WriteLine($"Fp32x3StructFp32x2StructFunc returned {Fp32x3StructFp32x2StructFunc(fp32x3, fp32x2)}");

            Console.WriteLine($"Fp32x3StructSingleFp32x3StructSingleFunc returned {Fp32x3StructSingleFp32x3StructSingleFunc(fp32x3, 1.2f, fp32x3, 3.5f)}");

            Console.WriteLine($"Fp32x4StructFunc returned {Fp32x4StructFunc(fp32x4)}");

            Console.WriteLine($"Fp32x4StructFp32x4StructFunc returned {Fp32x4StructFp32x4StructFunc(fp32x4, fp32x4)}");

            var fp64x2 = new Fp64x2Struct(1.2, 3.5);
            var fp64x3 = new Fp64x3Struct(6.7, 10.11, 13.14);
            var fp64x4 = new Fp64x4Struct(15.17, 19.21, 22.23, 26.29);

            Console.WriteLine($"Fp64x2StructFunc returned {Fp64x2StructFunc(fp64x2)}");

            Console.WriteLine($"Fp64x2StructFp64x3StructFunc returned {Fp64x2StructFp64x3StructFunc(fp64x2, fp64x3)}");

            Console.WriteLine($"Fp64x3StructFunc returned {Fp64x3StructFunc(fp64x3)}");

            Console.WriteLine($"Fp64x3StructFp64x2StructFunc returned {Fp64x3StructFp64x2StructFunc(fp64x3, fp64x2)}");

            Console.WriteLine($"Fp64x3StructDoubleFp64x3StructDoubleFunc returned {Fp64x3StructDoubleFp64x3StructDoubleFunc(fp64x3, 1.2, fp64x3, 3.5)}");

            Console.WriteLine($"Fp64x4StructFunc returned {Fp64x4StructFunc(fp64x4)}");

            Console.WriteLine($"Fp64x4StructFp64x4StructFunc returned {Fp64x4StructFp64x4StructFunc(fp64x4, fp64x4)}");

            Console.WriteLine($"DoubleRetFunc returned {DoubleRetFunc()}");

            Console.WriteLine($"IntegerSseStructFunc returned {IntegerSseStructFunc()}");

            Console.WriteLine($"SseIntegerStructFunc returned {SseIntegerStructFunc()}");

            Console.WriteLine($"MixedSseStructFunc returned {MixedSseStructFunc()}");

            Console.WriteLine($"SseMixedStructFunc returned {SseMixedStructFunc()}");

            Console.WriteLine($"MixedMixedStructFunc returned {MixedMixedStructFunc()}");

            return(100);
        }
示例#2
0
 public static Fp32x2Struct Fp32x4StructFp32x4StructFunc(Fp32x3Struct fps1, Fp32x3Struct fps2, Fp32x2Struct fps3)
 {
     return(fps3);
 }
示例#3
0
 public static Fp32x3Struct Fp32x3StructSingleFp32x3StructSingleFunc(Fp32x3Struct fps1, float flt1, Fp32x3Struct fps2, float flt2)
 {
     return(fps2);
 }
示例#4
0
 public static Fp32x3Struct Fp32x3StructFunc(Fp32x3Struct fps)
 {
     fps.z = 3;
     return(fps);
 }