GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
CUDAEvaluator.h
Go to the documentation of this file.
1#ifndef CUDA_EVALUATOR_H
2#define CUDA_EVALUATOR_H
3
4#pragma once
5
6#include <functional>
7#include <string>
8#include <vector>
9
11
21 int dims;
27 float sigma = 0.1f;
28
30 std::string problem_name;
31
36 std::function<double(const float*, int)> fitness_callback;
37
39 std::function<void(int, double)> progress_callback;
40};
41
52 std::vector<float>& h_genes,
53 std::vector<float>& h_fitness);
54
55} // namespace galib::cuda::internal
56
57#endif // CUDA_EVALUATOR_H
bool runCUDAEvolution(CUDARunParams &params, std::vector< float > &h_genes, std::vector< float > &h_fitness)
Runs the full GA evolution loop on the GPU.
Parameters for a full GPU-accelerated evolution run.
float sigma
Gaussian mutation standard deviation.
std::function< double(const float *, int)> fitness_callback
std::function< void(int, double)> progress_callback