Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock-fpga
Commits
4d57adca
Commit
4d57adca
authored
May 28, 2018
by
Leonardo Solis
Browse files
added unroll attributes
Former-commit-id:
754508be
parent
5de50aa6
Changes
5
Hide whitespace changes
Inline
Side-by-side
ofdock_taskpar_xl/Makefile
View file @
4d57adca
...
...
@@ -634,7 +634,7 @@ include $(COMMON_REPO)/utility/rules.mk
# Automate test
# "exe" and "xclbin" are rules from "rules.mk"
emu
:
XCL_EMULATION_MODE
=
sw_emu ./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
50
-nev
200000
XCL_EMULATION_MODE
=
sw_emu ./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
2
-nev
200000
0
debug
:
XCL_EMULATION_MODE
=
sw_emu xgdb
-args
./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
1
-nev
100
-lsit
10
-psize
10
ofdock_taskpar_xl/device/Krnl_Conform.cl
View file @
4d57adca
...
...
@@ -481,7 +481,11 @@ while(active) {
float3
tmp_coords[2]
;
#
endif
/*
#
pragma
unroll
*/
__attribute__
((
opencl_unroll_hint
))
LOOP_CONFORM_OUT:
for
(
uchar
i=0
; i<2; i++) {
tmp_coords[i]
=
loc_coords[pipe_cnt+i]
;
}
...
...
ofdock_taskpar_xl/device/Krnl_GA.cl
View file @
4d57adca
...
...
@@ -616,7 +616,11 @@ void Krnl_GA(
// Shift register to reduce II (initially II=6) of best entity for-loop
float shift_reg[SHIFT_REG_SIZE];
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_GA_SHIFT:
for (uchar i=0; i<SHIFT_REG_SIZE; i++) {
shift_reg[i] = 0.0f;
}
...
...
@@ -636,7 +640,11 @@ void Krnl_GA(
//if (pop_cnt>0) {
shift_reg[SHIFT_REG_SIZE_MINUS_ONE] = loc_energies[best_entity];
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_GA_SHIFT_MINUS_ONE:
for (uchar j=0; j<SHIFT_REG_SIZE_MINUS_ONE; j++) {
shift_reg[j] = shift_reg[j+1];
}
...
...
@@ -655,7 +663,11 @@ void Krnl_GA(
// Elitism: copying the best entity to new population
// ---------------------------------------------------
if (new_pop_cnt == 1) {
/*
#pragma unroll
*/
__attribute__((opencl_unroll_hint))
LOOP_GA_ELITISM:
for (uchar gene_cnt=0; gene_cnt<ACTUAL_GENOTYPE_LENGTH; gene_cnt++) {
LocalPopNext[0][gene_cnt & MASK_GENOTYPE] = LocalPopCurr[best_entity][gene_cnt & MASK_GENOTYPE];
}
...
...
ofdock_taskpar_xl/device/Krnl_IntraE.cl
View file @
4d57adca
...
...
@@ -103,7 +103,11 @@ 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
;
...
...
@@ -191,7 +195,11 @@ while(active) {
fixedpt64_fromfloat
(
partialE3
)
+
fixedpt64_fromfloat
(
partialE4
)
;
/*
#
pragma
unroll
*/
__attribute__
((
opencl_unroll_hint
))
LOOP_INTRAE_SHIFT:
for
(
uchar
j=0
; j<32; j++) {
shift_intraE[j]
=
shift_intraE[j+1]
;
}
...
...
@@ -204,7 +212,11 @@ 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++) {
//intraE
+=
shift_intraE[j]
;
fixpt_intraE
+=
shift_intraE[j]
;
...
...
ofdock_taskpar_xl/device/Krnl_PRNG.cl
View file @
4d57adca
...
...
@@ -32,7 +32,11 @@ void Krnl_Prng_BT_ushort_float(unsigned int Host_seed1,
uint
u_tmp[4]
; // used as short in GA
float
f_tmp[4]
;
/*
#
pragma
unroll
*/
__attribute__
((
opencl_unroll_hint
))
LOOP_PRNG_BT_USHORT_FLOAT:
for
(
uchar
i=0
; i<4; i++) {
uchar2
lsb
;
...
...
@@ -98,7 +102,11 @@ void Krnl_Prng_GG_uchar(unsigned int Host_seed,
uchar
tmp[2]
;
/*
#
pragma
unroll
*/
__attribute__
((
opencl_unroll_hint
))
LOOP_PRNG_GG_UCHAR:
for
(
uchar
i=0
; i<2; i++) {
uchar
lsb
;
lsb
=
lfsr
&
0x01u
;
...
...
@@ -223,7 +231,11 @@ void Krnl_Prng_LS123_ushort(unsigned int Host_seed1,
ushort
tmp[9]
;
/*
#
pragma
unroll
*/
__attribute__
((
opencl_unroll_hint
))
LOOP_PRNG_LS123_USHORT:
for
(
uint
i=0
; i<9; i++){
uchar
lsb[9]
;
lsb
[i]
=
lfsr[i]
&
0x01u
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment