Commit eab7d539 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

improved lmem acc GA krnl: LocalPopCurr was made stall-free


Former-commit-id: ad09cc58
parent 2dc88aa8
......@@ -160,6 +160,8 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
// Other banking configuration (see PopNext, eneNext) might reduce logic
// but makes PopCurr stallable
__local float LocalPopCurr[MAX_POPSIZE][ACTUAL_GENOTYPE_LENGTH];
__local float LocalEneCurr[MAX_POPSIZE];
......@@ -285,8 +287,7 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
// Elitism: copying the best entity to new population
// ---------------------------------------------------
if (new_pop_cnt == 1) {
#pragma unroll
for (uchar gene_cnt=0; gene_cnt<ACTUAL_GENOTYPE_LENGTH; gene_cnt++) {
for (uchar gene_cnt=0; gene_cnt<DockConst_num_of_genes; gene_cnt++) {
LocalPopNext[0][gene_cnt & MASK_GENOTYPE] = LocalPopCurr[best_entity][gene_cnt & MASK_GENOTYPE];
}
LocalEneNext[0] = loc_energies[best_entity];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment