Commit 6b6c6428 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

renamed GA2PRNG chan

parent 1d7bec1f
......@@ -52,14 +52,9 @@ channel uchar2 chan_PRNG2GA_GG_uchar_prng;
channel float chan_PRNG2GA_GG_float_prng __attribute__((depth(CHAN_DEPTH_GENOTYPE)));
// Turn-off signals to PRNG generators
// FIXME: these channels don't go anymore through IGL_Arbiter.
// That was initially the case, but was fixed.
// Name should be changed accordingly (GA instead of Arbiter)
// to avoid misleading data-flow information
channel bool chan_Arbiter_BT_ushort_float_off;
channel bool chan_Arbiter_GG_uchar_off;
channel bool chan_Arbiter_GG_float_off;
channel bool chan_GA2PRNG_BT_ushort_float_off;
channel bool chan_GA2PRNG_GG_uchar_off;
channel bool chan_GA2PRNG_GG_float_off;
// Send genotype-producer-channel selector and genotype
// from IGL_Arbiter to Conform
......@@ -289,18 +284,6 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
#pragma ivdep array (LocalEneNext)
for (ushort new_pop_cnt = 1; new_pop_cnt < DockConst_pop_size; new_pop_cnt++) {
/*
// ---------------------------------------------------
// Elitism: copying the best entity to new population
// ---------------------------------------------------
if (new_pop_cnt == 1) {
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];
}
*/
#if defined (DEBUG_KRNL_GA)
printf("Krnl_GA: %u\n", new_pop_cnt);
#endif
......@@ -490,13 +473,13 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
// ------------------------------------------------------------------
// Turn off PRNG kernels
write_channel_intel(chan_Arbiter_BT_ushort_float_off, false);
write_channel_intel(chan_Arbiter_GG_uchar_off, false);
write_channel_intel(chan_Arbiter_GG_float_off, false);
write_channel_intel(chan_GA2PRNG_BT_ushort_float_off, false);
write_channel_intel(chan_GA2PRNG_GG_uchar_off, false);
write_channel_intel(chan_GA2PRNG_GG_float_off, false);
mem_fence(CLK_CHANNEL_MEM_FENCE);
// Turn off IGL_Arbiter, Conform, InterE, IntraE kernerls
write_channel_intel(chan_IGLArbiter_Off, false);
write_channel_intel(chan_IGLArbiter_Off, false);
mem_fence(CLK_CHANNEL_MEM_FENCE);
// Write final pop & energies back to FPGA-board DDRs
......
......@@ -15,7 +15,7 @@ void Krnl_Prng_BT_ushort_float(unsigned int Host_seed1,
while(!valid) {
bool active = true;
active = read_channel_nb_intel(chan_Arbiter_BT_ushort_float_off, &valid);
active = read_channel_nb_intel(chan_GA2PRNG_BT_ushort_float_off, &valid);
uint u_tmp[4]; // used as short in GA
float f_tmp[4];
......@@ -60,7 +60,7 @@ void Krnl_Prng_GG_uchar(unsigned int Host_seed,
while(!valid) {
bool active = true;
active = read_channel_nb_intel(chan_Arbiter_GG_uchar_off, &valid);
active = read_channel_nb_intel(chan_GA2PRNG_GG_uchar_off, &valid);
uchar tmp[2];
......@@ -94,7 +94,7 @@ void Krnl_Prng_GG_float(unsigned int Host_seed,
while(!valid) {
bool active = true;
active = read_channel_nb_intel(chan_Arbiter_GG_float_off, &valid);
active = read_channel_nb_intel(chan_GA2PRNG_GG_float_off, &valid);
for(uchar i=0; i<DockConst_num_of_genes; i++) {
float tmp;
......
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