diff --git a/real/ben-raytrace/Main.hs b/real/ben-raytrace/Main.hs index ad4e5e9c56cfb1322b024fb2e2f97c5fbf176b91..772cdd864db8cd5e117093535b05f478b8029712 100644 --- a/real/ben-raytrace/Main.hs +++ b/real/ben-raytrace/Main.hs @@ -14,6 +14,7 @@ import Sampler import SamplerMonad import Scene.Type import Scene.Scene2 as Scene +import System.Environment partitionPlane :: Coord -> Int -> [(Coord, Coord)] partitionPlane size chunkSize = @@ -28,11 +29,12 @@ partitionPlane size chunkSize = main :: IO () main = do scene <- mkScene + [size_str] <- getArgs let nRuns = 1 :: Int chunkSize = 64 :: Int nSamples = 32 :: Int - size = let n = 256 + size = let n = read size_str aspect = cameraAspect $ sceneCamera scene in Coord n (round $ realToFrac n / aspect) nRays = nRuns * nSamples * coordX size * coordY size diff --git a/real/ben-raytrace/Makefile b/real/ben-raytrace/Makefile index e1443f8e57489d27bc6b87011bbe7cfc0fad1282..d34ef1af586aebfcf3d9ecc22335ed92ce2452c6 100644 --- a/real/ben-raytrace/Makefile +++ b/real/ben-raytrace/Makefile @@ -3,6 +3,10 @@ include $(TOP)/mk/boilerplate.mk SRC_DEPS = binary bytestring array parallel primitive transformers mtl ghc-prim random +FAST_OPTS = 48 +NORM_OPTS = 64 +SLOW_OPTS = 256 + ALL_DIRS += Random SamplerMonad Scene include $(TOP)/mk/target.mk diff --git a/real/ben-raytrace/ben-raytrace.stdout b/real/ben-raytrace/ben-raytrace.stdout index ec131befab982e1ca2a4e6c8666472a73f512946..a994c1e5f0947b48e07bb2c36c16fe54950e01ef 100644 --- a/real/ben-raytrace/ben-raytrace.stdout +++ b/real/ben-raytrace/ben-raytrace.stdout @@ -1,3 +1,3 @@ -Rays: 1572864 +Rays: 98304 Figures: 10 Sampling... diff --git a/real/ben-raytrace/ben-raytrace.stdout.fast b/real/ben-raytrace/ben-raytrace.stdout.fast new file mode 100644 index 0000000000000000000000000000000000000000..dea2425fa3cf071b319ee7be01edd26444ad29d6 --- /dev/null +++ b/real/ben-raytrace/ben-raytrace.stdout.fast @@ -0,0 +1,3 @@ +Rays: 55296 +Figures: 10 +Sampling... diff --git a/real/ben-raytrace/ben-raytrace.stdout.slow b/real/ben-raytrace/ben-raytrace.stdout.slow new file mode 100644 index 0000000000000000000000000000000000000000..ec131befab982e1ca2a4e6c8666472a73f512946 --- /dev/null +++ b/real/ben-raytrace/ben-raytrace.stdout.slow @@ -0,0 +1,3 @@ +Rays: 1572864 +Figures: 10 +Sampling...