Class SingleKernelFitness<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.OpenCLFitness<T>
net.bmahe.genetics4j.gpu.spec.fitness.SingleKernelFitness<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final FitnessExtractor
<T> private final Map
<Device, KernelExecutionContext> static final org.apache.logging.log4j.Logger
private final SingleKernelFitnessDescriptor
-
Constructor Summary
ConstructorDescriptionSingleKernelFitness
(SingleKernelFitnessDescriptor _singleKernelFitnessDescriptor, FitnessExtractor<T> _fitnessExtractor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterAllEvaluations
(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService) void
afterEvaluation
(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService, long generation, List<Genotype> genotypes) void
beforeAllEvaluations
(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService) void
beforeEvaluation
(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService, long generation, List<Genotype> genotypes) protected void
protected void
clearResultData
(Device device) protected void
clearStaticData
(Device device) compute
(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService, long generation, List<Genotype> genotypes) static <U extends Comparable<U>>
SingleKernelFitness<U> of
(SingleKernelFitnessDescriptor singleKernelFitnessDescriptor, FitnessExtractor<U> fitnessExtractor) Methods inherited from class net.bmahe.genetics4j.gpu.spec.fitness.OpenCLFitness
afterAllEvaluations, afterEvaluation, beforeAllEvaluations, beforeEvaluation
-
Field Details
-
logger
public static final org.apache.logging.log4j.Logger logger -
singleKernelFitnessDescriptor
-
fitnessExtractor
-
staticData
-
data
-
resultData
-
kernelExecutionContexts
-
-
Constructor Details
-
SingleKernelFitness
public SingleKernelFitness(SingleKernelFitnessDescriptor _singleKernelFitnessDescriptor, FitnessExtractor<T> _fitnessExtractor)
-
-
Method Details
-
clearStaticData
-
clearData
-
clearResultData
-
beforeAllEvaluations
public void beforeAllEvaluations(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService) - Overrides:
beforeAllEvaluations
in classOpenCLFitness<T extends Comparable<T>>
-
beforeEvaluation
public void beforeEvaluation(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService, long generation, List<Genotype> genotypes) - Overrides:
beforeEvaluation
in classOpenCLFitness<T extends Comparable<T>>
-
compute
public CompletableFuture<List<T>> compute(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService, long generation, List<Genotype> genotypes) - Specified by:
compute
in classOpenCLFitness<T extends Comparable<T>>
-
afterEvaluation
public void afterEvaluation(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService, long generation, List<Genotype> genotypes) - Overrides:
afterEvaluation
in classOpenCLFitness<T extends Comparable<T>>
-
afterAllEvaluations
public void afterAllEvaluations(OpenCLExecutionContext openCLExecutionContext, ExecutorService executorService) - Overrides:
afterAllEvaluations
in classOpenCLFitness<T extends Comparable<T>>
-
of
public static <U extends Comparable<U>> SingleKernelFitness<U> of(SingleKernelFitnessDescriptor singleKernelFitnessDescriptor, FitnessExtractor<U> fitnessExtractor)
-