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

labelled kernel loops


Former-commit-id: fef4a8a7
parent efdee52e
......@@ -47,11 +47,14 @@ void Krnl_Conform(
char active = 0x01;
__local int rotlist_localcache [MAX_NUM_OF_ROTATIONS];
LOOP_FOR_CONFORM_ROTBONDLIST:
for (ushort c = 0; c < DockConst_rotbondlist_length; c++) {
rotlist_localcache [c] = KerConstStatic_rotlist_const [c];
}
#pragma max_concurrency 32
LOOP_WHILE_CONFORM_MAIN:
while(active) {
char mode;
......@@ -116,6 +119,7 @@ while(active) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_CONFORM_READ_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
float fl_tmp;
switch (mode) {
......@@ -180,6 +184,7 @@ while(active) {
if (active == 0x00) {printf(" %-20s: %s\n", "Krnl_Conform", "must be disabled");}
#endif
LOOP_FOR_CONFORM_MAIN:
for (ushort rotation_counter = 0; rotation_counter < DockConst_rotbondlist_length; rotation_counter++)
{
int rotation_list_element = rotlist_localcache [rotation_counter];
......@@ -466,6 +471,7 @@ while(active) {
}
*/
LOOP_FOR_CONFORM_WRITE_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
if (pipe_cnt == 0) {
#if 0
......
......@@ -37,6 +37,7 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
uint LS3_eval = 0;
*/
LOOP_WHILE_IGL_MAIN:
while(active) {
/*
bool Off_valid = false;
......@@ -1371,6 +1372,7 @@ while(active) {
uchar bound = active ? bound_tmp : 1;
// Send "mode" to Conform
LOOP_FOR_IGL_WRITE_MODE:
for (uchar j=0; j<bound; j++) {
#if 0
/*
......
......@@ -53,6 +53,7 @@ void Krnl_InterE(
__global const float* GlobFgrids3 = & GlobFgrids [Host_mul_tmp3];
#pragma max_concurrency 32
LOOP_WHILE_INTERE_MAIN:
while(active) {
char mode;
......@@ -92,6 +93,7 @@ while(active) {
active = actmode;
mode = actmode;
LOOP_FOR_INTERE_READ_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
/*
float8 tmp = read_channel_altera(chan_Conf2Intere_xyz);
......@@ -119,6 +121,7 @@ while(active) {
#endif
// For each ligand atom
LOOP_FOR_INTER_MAIN:
for (uchar atom1_id=0; atom1_id<DockConst_num_of_atoms; atom1_id++)
{
char atom1_typeid = KerConstStatic_atom_types_const [atom1_id];
......
......@@ -45,11 +45,13 @@ void Krnl_IntraE(
char active = 0x01;
__local char3 intraE_contributors_localcache [MAX_INTRAE_CONTRIBUTORS];
LOOP_FOR_INTRAE_CONTRIBUTORS:
for (ushort i=0; i<MAX_INTRAE_CONTRIBUTORS; i++) {
intraE_contributors_localcache [i] = KerConstStatic_intraE_contributors_const [i];
}
#pragma max_concurrency 32
LOOP_WHILE_INTRAE_MAIN:
while(active) {
char mode;
......@@ -87,6 +89,7 @@ while(active) {
active = actmode;
mode = actmode;
LOOP_FOR_INTRAE_READ_XYZ:
for (uchar pipe_cnt=0; pipe_cnt<DockConst_num_of_atoms; pipe_cnt+=2) {
/*
float8 tmp = read_channel_altera(chan_Conf2Intrae_xyz);
......@@ -131,6 +134,7 @@ while(active) {
// For each intramolecular atom contributor pair
//#pragma unroll 10
LOOP_FOR_INTRAE_MAIN:
for (ushort contributor_counter=0; contributor_counter<DockConst_num_of_intraE_contributors; contributor_counter++) {
char3 ref_intraE_contributors_const;
......
......@@ -42,6 +42,7 @@ void Krnl_LS(
bool valid = true;
LOOP_WHILE_LS_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off1_active, &valid_active);
......@@ -87,6 +89,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS1)
/*
......@@ -116,6 +119,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS_ITERATION_RHO:
#if defined (FIXED_POINT_LS1)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
#else
......@@ -192,6 +196,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
LOOP_FOR_LS_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS_float_prng);
......@@ -284,6 +289,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
LOOP_WHILE_LS_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
if (intra_valid == false) {
......@@ -316,6 +322,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i] ;
......@@ -332,6 +339,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
}
......@@ -349,6 +357,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i] ;
......@@ -364,6 +373,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
}
......@@ -383,6 +393,7 @@ while(valid) {
#endif
// write back data to GA
LOOP_FOR_LS_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
float2 evalenergy = {*(float*)&LS_eval, current_energy};
......
......@@ -42,6 +42,7 @@ void Krnl_LS2(
bool valid = true;
LOOP_WHILE_LS2_MAIN:
while(valid) {
/*
bool active;
......@@ -60,6 +61,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS2_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off2_active, &valid_active);
......@@ -85,6 +87,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS2_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS2)
/*
......@@ -118,6 +121,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS2_ITERATION_RHO:
#if defined (FIXED_POINT_LS2)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
#else
......@@ -194,6 +198,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
LOOP_FOR_LS2_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS2_float_prng);
......@@ -286,6 +291,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
LOOP_WHILE_LS2_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
if (intra_valid == false) {
......@@ -322,6 +328,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS2_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
deviate_minus_bias [i];
......@@ -339,6 +346,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS2_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
}
......@@ -355,6 +363,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS2_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i] ;
......@@ -370,6 +379,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS2_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
}
......@@ -389,6 +399,7 @@ while(valid) {
#endif
// write back data to GA
LOOP_FOR_LS2_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
float2 evalenergy = {*(float*)&LS_eval, current_energy};
......
......@@ -42,6 +42,7 @@ void Krnl_LS3(
bool valid = true;
LOOP_WHILE_LS3_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS3_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off3_active, &valid_active);
......@@ -86,6 +88,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS3_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS3)
/*
......@@ -119,6 +122,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS3_ITERATION_RHO:
#if defined (FIXED_POINT_LS3)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
#else
......@@ -195,6 +199,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
LOOP_FOR_LS3_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS3_float_prng);
......@@ -287,6 +292,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
LOOP_WHILE_LS3_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
if (intra_valid == false) {
......@@ -323,6 +329,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS3_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i];
......@@ -339,6 +346,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS3_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
}
......@@ -356,6 +364,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS3_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
deviate_minus_bias [i];
......@@ -371,6 +380,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS3_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
}
......@@ -390,6 +400,7 @@ while(valid) {
#endif
// write back data to GA
LOOP_FOR_LS3_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
float2 evalenergy = {*(float*)&LS_eval, current_energy};
......
......@@ -42,6 +42,7 @@ void Krnl_LS4(
bool valid = true;
LOOP_WHILE_LS4_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS4_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off4_active, &valid_active);
......@@ -86,6 +88,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS4_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS4)
/*
......@@ -119,6 +122,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS4_ITERATION_RHO:
#if defined (FIXED_POINT_LS4)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
#else
......@@ -195,6 +199,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
LOOP_FOR_LS4_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS4_float_prng);
......@@ -287,6 +292,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
LOOP_WHILE_LS4_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
if (intra_valid == false) {
......@@ -320,6 +326,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS4_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
deviate_minus_bias [i];
......@@ -337,6 +344,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS4_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
}
......@@ -353,6 +361,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS4_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i] ;
......@@ -368,6 +377,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS4_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
}
......@@ -387,6 +397,7 @@ while(valid) {
#endif
// write back data to GA
LOOP_FOR_LS4_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
float2 evalenergy = {*(float*)&LS_eval, current_energy};
......
......@@ -42,6 +42,7 @@ void Krnl_LS5(
bool valid = true;
LOOP_WHILE_LS5_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS5_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off5_active, &valid_active);
......@@ -86,6 +88,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS5_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS5)
/*
......@@ -119,6 +122,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS5_ITERATION_RHO:
#if defined (FIXED_POINT_LS5)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
#else
......@@ -194,6 +198,7 @@ while(valid) {
*/
// new random deviate
// rho is the deviation of the uniform distribution
LOOP_FOR_LS5_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS5_float_prng);
......@@ -286,6 +291,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
LOOP_WHILE_LS5_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
if (intra_valid == false) {
......@@ -322,6 +328,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS5_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
deviate_minus_bias [i];
......@@ -339,6 +346,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS5_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
}
......@@ -355,6 +363,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS5_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i] ;
......@@ -370,6 +379,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS5_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
}
......@@ -389,6 +399,7 @@ while(valid) {
#endif
// write back data to GA
LOOP_FOR_LS5_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
float2 evalenergy = {*(float*)&LS_eval, current_energy};
......
......@@ -42,6 +42,7 @@ void Krnl_LS6(
bool valid = true;
LOOP_WHILE_LS6_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS6_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off6_active, &valid_active);
......@@ -86,6 +88,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS6_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS6)
/*
......@@ -118,6 +121,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS6_ITERATION_RHO:
#if defined (FIXED_POINT_LS6)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {
#else
......@@ -194,6 +198,7 @@ while(valid) {
// new random deviate
// rho is the deviation of the uniform distribution
LOOP_FOR_LS6_WRITE_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
/*
float tmp_prng = read_channel_altera(chan_PRNG2GA_LS6_float_prng);
......@@ -286,6 +291,7 @@ while(valid) {
/*
while( (intra_valid == false) || (inter_valid == false)) {
*/
LOOP_WHILE_LS6_READ_ENERGIES:
while( (intra_valid != 0) || (inter_valid != 0)) {
/*
if (intra_valid == false) {
......@@ -322,6 +328,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS6_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
deviate_minus_bias [i];
......@@ -339,6 +346,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS6_FIXEDPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0: (genotype_bias [i] >> 1);
}
......@@ -355,6 +363,7 @@ while(valid) {
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS6_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
deviate_minus_bias [i] ;
......@@ -370,6 +379,7 @@ while(valid) {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS6_FLOATPT_UPDATE_NEG_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (iteration_cnt == 1)? 0.0f: (0.5f*genotype_bias [i]);
}
......@@ -389,6 +399,7 @@ while(valid) {
#endif
// write back data to GA
LOOP_FOR_LS6_WRITEBACK2GA:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
if (i == 0) {
float2 evalenergy = {*(float*)&LS_eval, current_energy};
......
......@@ -42,6 +42,7 @@ void Krnl_LS7(
bool valid = true;
LOOP_WHILE_LS7_MAIN:
while(valid) {
/*
bool active;
......@@ -61,6 +62,7 @@ while(valid) {
/*
while( (valid_active == false) && (valid_energy == false)) {
*/
LOOP_WHILE_LS7_ACTIVE:
while( (valid_active != 0) && (valid_energy != 0)) {
/*
active = read_channel_nb_altera(chan_GA2LS_Off7_active, &valid_active);
......@@ -86,6 +88,7 @@ while(valid) {
float genotype [ACTUAL_GENOTYPE_LENGTH];
#endif
LOOP_FOR_LS7_READ_INPUT_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
#if defined (FIXED_POINT_LS7)
/*
......@@ -119,6 +122,7 @@ while(valid) {
bool positive_direction = true;
// performing local search
LOOP_WHILE_LS7_ITERATION_RHO:
#if defined (FIXED_POINT_LS7)
while ((iteration_cnt < DockConst_max_num_of_iters) && (fixpt_rho > DockConst_rho_lower_bound)) {