Commit 2c78dcc3 authored by lvs's avatar lvs
Browse files

added support for read/write_pipe()


Former-commit-id: d70f66b2
parent 5935c7d4
......@@ -6,7 +6,8 @@ PROFILE ?= no
# Default C++ Compiler Flags and xocc compiler flags
CXXFLAGS:=-Wall -O0 -g -std=c++14
CLFLAGS:= --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s
#CLFLAGS:= --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s
CLFLAGS:= --xp "param:compiler.version=31" --xp "param:compiler.preserveHlsOutput=1" --xp "param:compiler.generateExtraRunData=true" -s
ifneq ($(REPORT),none)
CLFLAGS += --report $(REPORT)
......
......@@ -60,6 +60,7 @@ while(active) {
fixedpt theta;
fixedpt genrotangle;
fixedpt3 genotype_xyz;
/*
fixedpt3 __attribute__ ((
memory,
numbanks(1),
......@@ -68,11 +69,14 @@ while(active) {
numreadports(3),
numwriteports(1)
)) loc_coords [MAX_NUM_OF_ATOMS];
*/
fixedpt3 loc_coords [MAX_NUM_OF_ATOMS];
#else
float phi;
float theta;
float genrotangle;
float3 genotype_xyz;
/*
float3 __attribute__ ((
memory,
numbanks(1),
......@@ -81,6 +85,8 @@ while(active) {
numreadports(3),
numwriteports(1)
)) loc_coords [MAX_NUM_OF_ATOMS];
*/
float3 loc_coords [MAX_NUM_OF_ATOMS];
#endif
/*
......
......@@ -265,7 +265,8 @@ fixedpt fixedpt_map_angle_360(fixedpt angle)
__kernel __attribute__ ((max_global_work_dim(0)))
*/
__kernel __attribute__ ((reqd_work_group_size(1,1,1)))
void Krnl_GA(__global float* restrict GlobPopulationCurrent,
void Krnl_GA(
__global float* restrict GlobPopulationCurrent,
__global float* restrict GlobEnergyCurrent,
#if defined(SINGLE_COPY_POP_ENE)
__global unsigned int* restrict GlobEvals_performed,
......@@ -402,21 +403,28 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
//float LocalEneNext[MAX_POPSIZE];
// This configuration reduces logic and does not increase block RAM usage
/*
float __attribute__ ((
memory,
numbanks(4),
bankwidth(32),
)) LocalPopNext[MAX_POPSIZE][ACTUAL_GENOTYPE_LENGTH];
*/
float LocalPopNext[MAX_POPSIZE][ACTUAL_GENOTYPE_LENGTH];
/*
float __attribute__ ((
memory,
numbanks(4),
bankwidth(4),
)) LocalEneNext[MAX_POPSIZE];
*/
float LocalEneNext[MAX_POPSIZE];
// ------------------------------------------------------------------
// Genetic Generation (GG)
// ------------------------------------------------------------------
/*
float __attribute__ ((
memory,
numbanks(1),
......@@ -425,6 +433,8 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
numreadports(6),
numwriteports(1)
)) loc_energies[MAX_POPSIZE];
*/
float loc_energies[MAX_POPSIZE];
// Shift register to reduce II (initially II=6) of best entity for-loop
float shift_reg[SHIFT_REG_SIZE];
......@@ -1082,7 +1092,6 @@ void Krnl_GA(__global float* restrict GlobPopulationCurrent,
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
#include "Krnl_PRNG.cl"
#include "Krnl_LS.cl"
......
......@@ -57,6 +57,7 @@ while(active) {
char mode;
/*
float3 __attribute__ ((
memory,
numbanks(2),
......@@ -65,6 +66,8 @@ while(active) {
numreadports(1),
numwriteports(1)
)) loc_coords[MAX_NUM_OF_ATOMS];
*/
float3 loc_coords[MAX_NUM_OF_ATOMS];
//printf("BEFORE In INTER CHANNEL\n");
// --------------------------------------------------------------
......
......@@ -46,6 +46,7 @@ void Krnl_IntraE(
while(active) {
char mode;
/*
float3 __attribute__ ((
memory,
numbanks(2),
......@@ -54,6 +55,8 @@ while(active) {
numreadports(2),
numwriteports(1)
)) loc_coords[MAX_NUM_OF_ATOMS];
*/
float3 loc_coords[MAX_NUM_OF_ATOMS];
//printf("BEFORE In INTRA CHANNEL\n");
// --------------------------------------------------------------
......
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