GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
Public Attributes | List of all members
galib::cuda::internal::CUDARunParams Struct Reference

Parameters for a full GPU-accelerated evolution run. More...

#include <CUDAEvaluator.h>

Public Attributes

int pop_size
 
int dims
 
int max_generations
 
float mutation_rate
 
float crossover_rate
 
bool use_elitism
 
int tournament_size = 3
 
float sigma = 0.1f
 Gaussian mutation standard deviation.
 
std::string problem_name
 
std::function< double(const float *, int)> fitness_callback
 
std::function< void(int, double)> progress_callback
 

Detailed Description

Parameters for a full GPU-accelerated evolution run.

The GPU handles selection, crossover, and mutation entirely on device. Fitness evaluation runs on GPU for known problem names; otherwise the fitness_callback is invoked on the host (CPU) each generation.

Definition at line 19 of file CUDAEvaluator.h.

Member Data Documentation

◆ crossover_rate

float galib::cuda::internal::CUDARunParams::crossover_rate

Definition at line 24 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ dims

int galib::cuda::internal::CUDARunParams::dims

Definition at line 21 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ fitness_callback

std::function<double(const float*, int)> galib::cuda::internal::CUDARunParams::fitness_callback

CPU fitness callback used when problem_name is unknown. Receives a flat float array [dims] for one individual, returns fitness.

Definition at line 36 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ max_generations

int galib::cuda::internal::CUDARunParams::max_generations

Definition at line 22 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ mutation_rate

float galib::cuda::internal::CUDARunParams::mutation_rate

Definition at line 23 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ pop_size

int galib::cuda::internal::CUDARunParams::pop_size

Definition at line 20 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ problem_name

std::string galib::cuda::internal::CUDARunParams::problem_name

Short name returned by FitnessFunction::name(). Empty = use callback.

Definition at line 30 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ progress_callback

std::function<void(int, double)> galib::cuda::internal::CUDARunParams::progress_callback

Called after each generation with (generation_index, best_fitness).

Definition at line 39 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ sigma

float galib::cuda::internal::CUDARunParams::sigma = 0.1f

Gaussian mutation standard deviation.

Definition at line 27 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ tournament_size

int galib::cuda::internal::CUDARunParams::tournament_size = 3

Definition at line 26 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().

◆ use_elitism

bool galib::cuda::internal::CUDARunParams::use_elitism

Definition at line 25 of file CUDAEvaluator.h.

Referenced by galib::cuda::StandardGACUDA< GeneType >::run().


The documentation for this struct was generated from the following file: