summaryrefslogtreecommitdiff
path: root/src/G4chroma.cc
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2012-01-30 16:59:45 -0500
committertlatorre <tlatorre@uchicago.edu>2021-05-09 08:42:38 -0700
commitf6fa4739cc476b21b755522e252ebfbb81c6fd13 (patch)
tree38103c04c5b7a9dc90620c619e44f9633569a6c5 /src/G4chroma.cc
parent6a5a1bafd0a24ca1b91a972c2f8042d61eaeea7a (diff)
downloadchroma-f6fa4739cc476b21b755522e252ebfbb81c6fd13.tar.gz
chroma-f6fa4739cc476b21b755522e252ebfbb81c6fd13.tar.bz2
chroma-f6fa4739cc476b21b755522e252ebfbb81c6fd13.zip
Speed up node intersection by 2.5x using tips from "Optimizing ray
tracing for CUDA" by Hannu Saransaari. The intersect_box() function has been rewritten to be much shorter and use the min() and max() functions, which map directly to hardware instructions. Additionally, the calculations inside intersect_box() have been reorganized to allow the compiler to use the combined multiply-add instruction, instead of doing a subtraction followed by a division (which is way slower).
Diffstat (limited to 'src/G4chroma.cc')
0 files changed, 0 insertions, 0 deletions