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

#28, replaced krnl ref: k27 to krnl_igl_arbiter


Former-commit-id: 984c78b8
parent 1682f366
......@@ -51,7 +51,7 @@ ENABLE_KRNL_LS7 = YES
ENABLE_KRNL_LS8 = YES
ENABLE_KRNL_LS9 = YES
ENABLE_K27 = YES
ENABLE_KRNL_IGL_ARBITER = YES
ifeq ($(ENABLE_KRNL_GA),YES)
KRNL_GA =-DENABLE_KRNL_GA
......@@ -209,31 +209,12 @@ else
KRNL_LS9 =
endif
ifeq ($(ENABLE_K27),YES)
K27 =-DENABLE_KERNEL27
ifeq ($(ENABLE_KRNL_IGL_ARBITER),YES)
KRNL_IGL_ARBITER =-DENABLE_KRNL_IGL_ARBITER
else
K27 =
KRNL_IGL_ARBITER =
endif
# =============================
# Reproduce result (remove randomness)
# =============================
......@@ -271,7 +252,7 @@ ENABLE_KERNELS = $(KRNL_GA) \
$(KRNL_LS7) \
$(KRNL_LS8) \
$(KRNL_LS9) \
$(K27)
$(KRNL_IGL_ARBITER)
# =============================
# Fixed-point
......
......@@ -196,32 +196,13 @@ static cl_command_queue command_queue_ls9 = NULL;
static cl_kernel kernel_ls9 = NULL;
static const char *name_krnl_ls9 = "Krnl_LS9";
#endif
#ifdef ENABLE_KERNEL27
static cl_command_queue command_queue27 = NULL;
static cl_kernel kernel27 = NULL;
static const char *name_k27 = "Krnl_IGL_Arbiter";
#ifdef ENABLE_KRNL_IGL_ARBITER
static cl_command_queue command_queue_igl_arbiter = NULL;
static cl_kernel kernel_igl_arbiter = NULL;
static const char *name_krnl_igl_arbiter = "Krnl_IGL_Arbiter";
#endif
static cl_program program = NULL;
// Function prototypes
......@@ -1342,66 +1323,16 @@ unsigned char Host_cons_limit = (unsigned char) dockpars.cons_limit;
setKernelArg(kernel_ls9,6, sizeof(mem_dummy), &mem_dummy);
#endif
#endif // End of ENABLE_KRNL_LS9
#ifdef ENABLE_KERNEL27 // Krnl_IGL_Arbiter
#ifdef ENABLE_KRNL_IGL_ARBITER // Krnl_IGL_Arbiter
/*
setKernelArg(kernel27,0, sizeof(unsigned char), &dockpars.num_of_genes);
setKernelArg(kernel_igl_arbiter,0, sizeof(unsigned char), &dockpars.num_of_genes);
*/
#if !defined(SW_EMU)
setKernelArg(kernel27,0, sizeof(mem_dummy), &mem_dummy);
setKernelArg(kernel_igl_arbiter,0, sizeof(mem_dummy), &mem_dummy);
#endif
#endif // End of ENABLE_KERNEL27
#endif // End of ENABLE_KRNL_IGL_ARBITER
#if defined(SINGLE_COPY_POP_ENE)
memcopyBufferObjectToDevice(command_queue_ga,mem_dockpars_conformations_current, cpu_init_populations, size_populations);
......@@ -1660,41 +1591,11 @@ unsigned char Host_cons_limit = (unsigned char) dockpars.cons_limit;
#ifdef ENABLE_KRNL_LS9
runKernelTask(command_queue_ls9,kernel_ls9,NULL,NULL);
#endif // ENABLE_KRNL_LS9
#ifdef ENABLE_KERNEL27
runKernelTask(command_queue27,kernel27,NULL,NULL);
#endif // ENABLE_KERNEL27
#ifdef ENABLE_KRNL_IGL_ARBITER
runKernelTask(command_queue_igl_arbiter,kernel_igl_arbiter,NULL,NULL);
#endif // ENABLE_KRNL_IGL_ARBITER
#if 0
clFinish(command_queue);
#endif
......@@ -1802,43 +1703,13 @@ unsigned char Host_cons_limit = (unsigned char) dockpars.cons_limit;
#ifdef ENABLE_KRNL_LS9
clFinish(command_queue_ls9);
#endif
#ifdef ENABLE_KERNEL27
clFinish(command_queue27);
#ifdef ENABLE_KRNL_IGL_ARBITER
clFinish(command_queue_igl_arbiter);
#endif
clock_stop_docking = clock();
#if defined(SINGLE_COPY_POP_ENE)
......@@ -2298,50 +2169,14 @@ bool init() {
kernel_ls9 = clCreateKernel(program, name_krnl_ls9, &status);
checkError(status, "Failed to create kernel ls9");
#endif
#ifdef ENABLE_KERNEL27
command_queue27 = clCreateCommandQueue(context, device, 0, &status);
checkError(status, "Failed to create command queue27");
kernel27 = clCreateKernel(program, name_k27, &status);
checkError(status, "Failed to create kernel");
#ifdef ENABLE_KRNL_IGL_ARBITER
command_queue_igl_arbiter = clCreateCommandQueue(context, device, 0, &status);
checkError(status, "Failed to create command queue igl_arbiter");
kernel_igl_arbiter = clCreateKernel(program, name_krnl_igl_arbiter, &status);
checkError(status, "Failed to create kernel igl_arbiter");
#endif
return true;
}
......@@ -2476,51 +2311,12 @@ void cleanup() {
if(kernel_ls9) {clReleaseKernel(kernel_ls9);}
if(command_queue_ls9) {clReleaseCommandQueue(command_queue_ls9);}
#endif
#ifdef ENABLE_KERNEL27
if(kernel27) {clReleaseKernel(kernel27);}
if(command_queue27) {clReleaseCommandQueue(command_queue27);}
#ifdef ENABLE_KRNL_IGL_ARBITER
if(kernel_igl_arbiter) {clReleaseKernel(kernel_igl_arbiter);}
if(command_queue_igl_arbiter) {clReleaseCommandQueue(command_queue_igl_arbiter);}
#endif
#if 0
if(command_queue) {clReleaseCommandQueue(command_queue);}
#endif
......
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