Ambient Occlusion is an algorithm that approximates the reflection of light off non-reflective surfaces. Since calculating true light reflection is incredibly expensive and impractical given today's hardware, algorithms like ambient occlusion are used to get convincingly close. Ambient occlusion finds intersections with objects in the scene and a ray from the origin to each pixel on the screen. If there is an intersection (a "hit"), it searches for intersections again, but using the "hit" as an origin. Depending on how many intersections it finds, it will be lighter or darker, to imitate shadows, which is the goal of ambient occlusion. Intel® Cilk™ Plus
cilk_for is used to render multiple horizontal lines in parallel, while Intel Cilk Plus Array Notation is used to speed up the search for intersections with the "hit" as an origin. In the scalar implementation, the auto-vectorizer does a somewhat poor job of vectorizing the ambient occlusion calculation (intersections with the "hit" as an origin), which can be fixed by adding a single Intel Cilk Plus SIMD Notation line.