public static float TestBoxRaySIMD(int iterationCount)
{
Ray ray;
ray.Direction = new Vector3(1, 1, 1);
ray.Position = new Vector3(-3);
BoundingBox box;
box.Min = new Vector3(-1);
box.Max = new Vector3(1);
float accumulator = 0;
for (int i = 0; i < iterationCount; ++i)
{
float t;
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
Ray.Intersects(ref ray, ref box, out t);
accumulator += t;
}
return accumulator;
}