minor bug in parser, -O2 faster than -O3
This commit is contained in:
parent
b3749c3f53
commit
cdc0cb1ffa
@ -76,6 +76,6 @@ executable raytrace
|
|||||||
-- Base language which the package is written in.
|
-- Base language which the package is written in.
|
||||||
default-language: Haskell2010
|
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
|
-- ghc-options: -Odph -fno-liberate-case -funfolding-use-threshold1000 -funfolding-keeness-factor1000 -optlo-O3 -fllvm -prof -auto-all
|
||||||
|
|
||||||
|
@ -15,5 +15,5 @@ light -1 10 -1 1.0 0.2 0.2
|
|||||||
light 10 0 5 0.2 0.2 1.0
|
light 10 0 5 0.2 0.2 1.0
|
||||||
|
|
||||||
# mesh: filename, FLAT/SMOOTH, material
|
# 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 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 PHONG 0.5 0.5 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 0.0
|
||||||
|
@ -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.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.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
|
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
|
||||||
|
|
||||||
|
@ -127,6 +127,7 @@ parsePlane = do
|
|||||||
c <- parseVector
|
c <- parseVector
|
||||||
n <- parseVector
|
n <- parseVector
|
||||||
m <- parseMaterial
|
m <- parseMaterial
|
||||||
|
skipSpace
|
||||||
return $ OpP Plane
|
return $ OpP Plane
|
||||||
{ planeCenter = c
|
{ planeCenter = c
|
||||||
, planeNormal = normalize n
|
, planeNormal = normalize n
|
||||||
@ -139,6 +140,7 @@ parseSphere = do
|
|||||||
skipSpace
|
skipSpace
|
||||||
r <- double
|
r <- double
|
||||||
m <- parseMaterial
|
m <- parseMaterial
|
||||||
|
skipSpace
|
||||||
return $ OpS Sphere
|
return $ OpS Sphere
|
||||||
{ sphereCenter = p
|
{ sphereCenter = p
|
||||||
, sphereRadius = (fromRational . toRational) r
|
, sphereRadius = (fromRational . toRational) r
|
||||||
|
Loading…
Reference in New Issue
Block a user