minor bug in parser, -O2 faster than -O3

This commit is contained in:
Nicole Dresselhaus 2015-02-05 14:05:09 +01:00
parent b3749c3f53
commit cdc0cb1ffa
4 changed files with 6 additions and 3 deletions

View File

@ -76,6 +76,6 @@ executable raytrace
-- Base language which the package is written in.
default-language: Haskell2010
ghc-options: -Odph -rtsopts -threaded -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000 -optlo-O3 -fllvm -eventlog
ghc-options: -Odph -rtsopts -threaded -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000 -optlo-O2 -eventlog -fllvm
-- ghc-options: -Odph -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000 -optlo-O3 -fllvm -prof -auto-all

View File

@ -15,5 +15,5 @@ light -1 10 -1 1.0 0.2 0.2
light 10 0 5 0.2 0.2 1.0
# mesh: filename, FLAT/SMOOTH, material
mesh cube.off FLAT 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0
#mesh cube.off PHONG 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0
#mesh cube.off FLAT 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0
mesh cube.off PHONG 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0

View File

@ -1618,3 +1618,4 @@ sphere 0.841523 0.32472 -0.173257 0.04532 1 1 1 1 1 1 1.0 1.0 1.0 100.0 0.0
sphere 0.911467 0.263689 -0.210797 0.04532 1 1 1 1 1 1 1.0 1.0 1.0 100.0 0.0
sphere 0.861124 0.246127 -0.250717 0.04532 1 1 1 1 1 1 1.0 1.0 1.0 100.0 0.0
sphere 0.880989 0.309651 -0.248073 0.04532 1 1 1 1 1 1 1.0 1.0 1.0 100.0 0.0

View File

@ -127,6 +127,7 @@ parsePlane = do
c <- parseVector
n <- parseVector
m <- parseMaterial
skipSpace
return $ OpP Plane
{ planeCenter = c
, planeNormal = normalize n
@ -139,6 +140,7 @@ parseSphere = do
skipSpace
r <- double
m <- parseMaterial
skipSpace
return $ OpS Sphere
{ sphereCenter = p
, sphereRadius = (fromRational . toRational) r