Commit 5470d1a7 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

pipelined elitism loop + removed some non-sdaccel #pragmas

parent 98fdbac4
......@@ -53,7 +53,6 @@ void Krnl_Conform(
rotlist_localcache [c] = KerConstStatic_rotlist_const [c];
}
#pragma max_concurrency 32
LOOP_WHILE_CONFORM_MAIN:
while(active) {
char mode;
......@@ -482,9 +481,6 @@ while(active) {
float3 tmp_coords[2];
#endif
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_CONFORM_OUT:
for (uchar i=0; i<2; i++) {
......
......@@ -692,8 +692,10 @@ void Krnl_GA(
printf("best_entity: %3u, energy: %20.6f\n", best_entity, loc_energies[best_entity]);
#endif
/*
#pragma ivdep array (LocalPopNext)
#pragma ivdep array (LocalEneNext)
*/
__attribute__((xcl_pipeline_loop))
LOOP_FOR_GA_OUTER_GLOBAL:
for (ushort new_pop_cnt = 1; new_pop_cnt < DockConst_pop_size; new_pop_cnt++) {
......@@ -702,12 +704,9 @@ void Krnl_GA(
// Elitism: copying the best entity to new population
// ---------------------------------------------------
if (new_pop_cnt == 1) {
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
__attribute__((xcl_pipeline_loop))
LOOP_FOR_GA_INNER_ELITISM:
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];
......@@ -939,7 +938,9 @@ void Krnl_GA(
uint ls_eval_cnt = 0;
/*
#pragma ivdep
*/
__attribute__((xcl_pipeline_loop))
LOOP_FOR_GA_LS_OUTER:
for (ushort ls_ent_cnt=0; ls_ent_cnt<DockConst_num_of_lsentities; ls_ent_cnt+=9) {
......@@ -1190,7 +1191,9 @@ void Krnl_GA(
LocalEneNext[entity_ls8] = evalenergy_tmp8.y;
LocalEneNext[entity_ls9] = evalenergy_tmp9.y;
/*
#pragma ivdep
*/
__attribute__((xcl_pipeline_loop))
LOOP_FOR_GA_LS_INNER_READ_GENOTYPE:
for (uchar gene_cnt=0; gene_cnt<DockConst_num_of_genes; gene_cnt++) {
......
......@@ -142,7 +142,6 @@ void Krnl_IGL_Arbiter(/*unsigned char DockConst_num_of_genes*/
bool mode_LS_bool [9];
//#pragma unroll
__attribute__((opencl_unroll_hint))
LOOP_FOR_IGL_INIT_MODE_LS_BOOL:
for(uchar i=0; i<9; i++) {
......
......@@ -52,7 +52,6 @@ void Krnl_InterE(
__global const float* GlobFgrids2 = & GlobFgrids [Host_mul_tmp2];
__global const float* GlobFgrids3 = & GlobFgrids [Host_mul_tmp3];
#pragma max_concurrency 32
LOOP_WHILE_INTERE_MAIN:
while(active) {
......@@ -114,6 +113,7 @@ while(active) {
#endif
// For each ligand atom
__attribute__((xcl_pipeline_loop))
LOOP_FOR_INTER_MAIN:
for (uchar atom1_id=0; atom1_id<DockConst_num_of_atoms; atom1_id++)
{
......
......@@ -50,7 +50,6 @@ void Krnl_IntraE(
intraE_contributors_localcache [i] = KerConstStatic_intraE_contributors_const [i];
}
#pragma max_concurrency 32
LOOP_WHILE_INTRAE_MAIN:
while(active) {
char mode;
......@@ -112,21 +111,17 @@ while(active) {
//float shift_intraE[33];
fixedpt64 shift_intraE[33];
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_INTRAE_SHIFT_INIT:
for (uchar i=0; i<33; i++) {
//shift_intraE[i] = 0.0f;
shift_intraE[i] = 0;
}
#endif
// For each intramolecular atom contributor pair
//#pragma unroll 10
__attribute__((xcl_pipeline_loop))
LOOP_FOR_INTRAE_MAIN:
for (ushort contributor_counter=0; contributor_counter<DockConst_num_of_intraE_contributors; contributor_counter++) {
......@@ -258,9 +253,6 @@ while(active) {
fixedpt64_fromfloat(partialE3) +
fixedpt64_fromfloat(partialE4);
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_INTRAE_SHIFT:
for (uchar j=0; j<32; j++) {
......@@ -275,9 +267,6 @@ while(active) {
#if defined (FIXED_POINT_INTRAE)
fixedpt64 fixpt_intraE = 0;
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_INTRAE_SHIFT_RED:
for (uchar j=0; j<32; j++) {
......
......@@ -321,7 +321,7 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
__attribute__((xcl_pipeline_loop))
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] :
......@@ -338,7 +338,7 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
__attribute__((xcl_pipeline_loop))
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);
......@@ -356,7 +356,7 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
__attribute__((xcl_pipeline_loop))
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] :
......@@ -372,7 +372,7 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
__attribute__((xcl_pipeline_loop))
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]);
......
......@@ -327,7 +327,6 @@ while(valid) {
// updating offspring_genotype
// 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]:
......@@ -345,7 +344,6 @@ while(valid) {
else {
// 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);
......@@ -362,7 +360,6 @@ while(valid) {
// updating offspring_genotype
// 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] :
......@@ -378,7 +375,6 @@ while(valid) {
else {
// 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]);
......
......@@ -328,7 +328,6 @@ while(valid) {
// updating offspring_genotype
// 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] :
......@@ -345,7 +344,6 @@ while(valid) {
else {
// 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);
......@@ -363,7 +361,6 @@ while(valid) {
// updating offspring_genotype
// 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]:
......@@ -379,7 +376,6 @@ while(valid) {
else {
// 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]);
......
......@@ -325,7 +325,6 @@ while(valid) {
// updating offspring_genotype
// 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]:
......@@ -343,7 +342,6 @@ while(valid) {
else {
// 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);
......@@ -360,7 +358,6 @@ while(valid) {
// updating offspring_genotype
// 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] :
......@@ -376,7 +373,6 @@ while(valid) {
else {
// 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]);
......
......@@ -327,7 +327,6 @@ while(valid) {
// updating offspring_genotype
// 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]:
......@@ -345,7 +344,6 @@ while(valid) {
else {
// 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);
......@@ -362,7 +360,6 @@ while(valid) {
// updating offspring_genotype
// 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] :
......@@ -378,7 +375,6 @@ while(valid) {
else {
// 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]);
......
......@@ -327,7 +327,6 @@ while(valid) {
// updating offspring_genotype
// 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]:
......@@ -345,7 +344,6 @@ while(valid) {
else {
// 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);
......@@ -362,7 +360,6 @@ while(valid) {
// updating offspring_genotype
// 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] :
......@@ -378,7 +375,6 @@ while(valid) {
else {
// 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]);
......
......@@ -328,7 +328,6 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS7_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -346,7 +345,6 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS7_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);
......@@ -363,7 +361,6 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS7_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -379,7 +376,6 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS7_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]);
......
......@@ -327,7 +327,6 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS8_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -345,7 +344,6 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS8_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);
......@@ -362,7 +360,6 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS8_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -378,7 +375,6 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS8_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]);
......
......@@ -328,7 +328,6 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS9_FIXEDPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i]:
......@@ -346,7 +345,6 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS9_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);
......@@ -363,7 +361,6 @@ while(valid) {
// updating offspring_genotype
// updating genotype_bias
//#pragma unroll 16
LOOP_FOR_LS9_FLOATPT_UPDATE_POS_GENOTYPE:
for (uchar i=0; i<DockConst_num_of_genes; i++) {
genotype_bias [i] = (positive_direction == true) ? deviate_plus_bias [i] :
......@@ -379,7 +376,6 @@ while(valid) {
else {
// updating (halving) genotype_bias
//#pragma unroll 16
LOOP_FOR_LS9_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]);
......
......@@ -45,9 +45,6 @@ void Krnl_Prng_BT_ushort_float(
uint u_tmp[4]; // used as short in GA
float f_tmp[4];
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_FOR_PRNG_BT_USHORT_FLOAT:
for(uchar i=0; i<4; i++) {
......@@ -142,9 +139,6 @@ void Krnl_Prng_GG_uchar(
uchar tmp[2];
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_FOR_PRNG_GG_UCHAR:
for(uchar i=0; i<2; i++) {
......@@ -299,9 +293,6 @@ void Krnl_Prng_LS123_ushort(
ushort tmp[9];
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_FOR_PRNG_LS123_USHORT:
for (uint i=0; i<9; i++){
......
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