public void Init()
 {
     m = (float2x2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <float2x2>() * 10000, UnsafeUtility.AlignOf <float2x2>(), Allocator.Persistent);
     for (int i = 0; i < 10000; ++i)
     {
         m[i] = float2x2.identity;
     }
 }
 public void Init()
 {
     rng = new Random(1);
     m   = (float2x2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <float2x2>() * iterations, UnsafeUtility.AlignOf <float2x2>(), Allocator.Persistent);
     for (int i = 0; i < iterations; ++i)
     {
         m[i] = float2x2.identity;
     }
 }
예제 #3
0
                public void Init()
                {
                    v = (float2x2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <float2x2>() * 100000, UnsafeUtility.AlignOf <float2x2>(), Allocator.Persistent);
                    for (int i = 0; i < 100000; ++i)
                    {
                        v[i] = new float2x2(1.0f);
                    }

                    hash = (uint2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <uint2>() * 100000, UnsafeUtility.AlignOf <uint2>(), Allocator.Persistent);
                    for (int i = 0; i < 100000; ++i)
                    {
                        hash[i] = 0;
                    }
                }
예제 #4
0
                public void Init()
                {
                    m1 = (float2x2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <float2x2>() * 10000, UnsafeUtility.AlignOf <float2x2>(), Allocator.Persistent);
                    for (int i = 0; i < 10000; ++i)
                    {
                        m1[i] = float2x2.identity;
                    }

                    m2 = (float2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <float2>() * 10000, UnsafeUtility.AlignOf <float2>(), Allocator.Persistent);
                    for (int i = 0; i < 10000; ++i)
                    {
                        m2[i] = new float2(1.0f, 0.0f);
                    }
                }
                public void Init()
                {
                    rng = new Random(1);
                    v   = (float2x2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <float2x2>() * iterations, UnsafeUtility.AlignOf <float2x2>(), Allocator.Persistent);
                    for (int i = 0; i < iterations; ++i)
                    {
                        v[i] = new float2x2(1.0f);
                    }

                    hash = (uint2 *)UnsafeUtility.Malloc(UnsafeUtility.SizeOf <uint2>() * iterations, UnsafeUtility.AlignOf <uint2>(), Allocator.Persistent);
                    for (int i = 0; i < iterations; ++i)
                    {
                        hash[i] = 0;
                    }
                }
예제 #6
0
 public static unsafe void TestIdentityFloat2x2(float2x2 *mat)
 {
     *mat = float2x2.identity;
 }