Difference between revisions of "Parallel Raytracer Assignment"
Jump to navigation
Jump to search
(Created page with "=Code To Investigate= ==RayTraceContext== <nowiki>public interface RayTraceContext { int width(); int height(); void mark(int xMin, int yMin, int xMaxExclusive, int yMax...") |
|||
Line 31: | Line 31: | ||
==DivideAndConquerRayTracer== | ==DivideAndConquerRayTracer== | ||
{{CodeToImplement|DivideAndConquerRayTracer|constructor<br/>thresholdPredicate<br/>rayTraceKernel|raytrace.exercise}} | {{CodeToImplement|DivideAndConquerRayTracer|constructor<br/>thresholdPredicate<br/>rayTraceKernel|raytrace.exercise}} | ||
+ | |||
+ | ===constructor=== | ||
+ | {{Sequential|public DivideAndConquerRayTracer(BiPredicate<Integer, Integer> thresholdPredicate)}} | ||
+ | |||
+ | Hang onto the thresholdPredicate in an instance variable. You will need it. | ||
+ | |||
+ | ===thresholdPredicate=== | ||
+ | {{Sequential|public BiPredicate<Integer, Integer> thresholdPredicate()}} | ||
+ | |||
+ | Return the thresholdPredicate you stored in an instance variable. | ||
===rayTrace=== | ===rayTrace=== |
Revision as of 16:10, 26 April 2022
Contents
Code To Investigate
RayTraceContext
public interface RayTraceContext { int width(); int height(); void mark(int xMin, int yMin, int xMaxExclusive, int yMaxExclusive); void markAndRender(int xMin, int yMin, int xMaxExclusive, int yMaxExclusive); }
Scheduler
public interface Scheduler { void void_fork(Runnable runnable); }
Code To Implement
SplitFourWayRayTracer
class: | SplitFourWayRayTracer.java | |
methods: | rayTrace | |
package: | raytrace.exercise | |
source folder: | student/src/main/java |
rayTrace
method: public void rayTrace(RayTraceContext context, Scheduler scheduler)
(parallel implementation required)
LoopRayTracer
class: | LoopRayTracer.java | |
methods: | constructor sectionsCreator rayTrace |
|
package: | raytrace.exercise | |
source folder: | student/src/main/java |
rayTrace
method: public void rayTrace(RayTraceContext context, Scheduler scheduler)
(parallel implementation required)
DivideAndConquerRayTracer
class: | DivideAndConquerRayTracer.java | |
methods: | constructor thresholdPredicate rayTraceKernel |
|
package: | raytrace.exercise | |
source folder: | student/src/main/java |
constructor
method: public DivideAndConquerRayTracer(BiPredicate<Integer, Integer> thresholdPredicate)
(sequential implementation only)
Hang onto the thresholdPredicate in an instance variable. You will need it.
thresholdPredicate
method: public BiPredicate<Integer, Integer> thresholdPredicate()
(sequential implementation only)
Return the thresholdPredicate you stored in an instance variable.
rayTrace
method: public void rayTrace(RayTraceContext context, Scheduler scheduler)
(parallel implementation required)
Checking Your Solution
Visualization
class: | RayTracerViz.java | VIZ |
package: | raytrace.viz | |
source folder: | student/src/main/java |
Correctness
class: | _SequentialRayTracerTestSuite.java | |
package: | raytrace.group | |
source folder: | testing/src/test/java |