Skip to content

Commit

Permalink
Make raytracer and parse_int benchmarks work on 32-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
magistere committed Nov 26, 2013
1 parent f875966 commit 3b887f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/perf/kernel/raytracer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end
+(a::Vec, b::Vec) = Vec(a.x+b.x, a.y+b.y, a.z+b.z)
-(a::Vec, b::Vec) = Vec(a.x-b.x, a.y-b.y, a.z-b.z)
*(a::Float64, b::Vec) = Vec(a*b.x, a*b.y, a*b.z)
*(a::Int64, b::Vec) = Vec(a*b.x, a*b.y, a*b.z)
*(a::Int, b::Vec) = Vec(a*b.x, a*b.y, a*b.z)
*(a::Vec, b::Float64) = *(b,a)
dot(a::Vec, b::Vec) = (a.x*b.x + a.y*b.y + a.z*b.z)
unitize(a::Vec) = (1. / sqrt(dot(a, a)) * a)
Expand Down
2 changes: 1 addition & 1 deletion test/perf/micro/perf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function parseintperf(t)
for i=1:t
n = rand(Uint32)
s = hex(n)
m = uint32(parseint(s,16))
m = uint32(parseint(Int64,s,16))
end
@test m == n
return n
Expand Down

0 comments on commit 3b887f5

Please sign in to comment.