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
4ea7a602
Commit
4ea7a602
authored
Nov 10, 2018
by
Leonardo Solis
Browse files
#31, removing not anymore needed wrapcl folder + their refs
compiles but same errors as commit
c15a9736
parent
c15a9736
Changes
24
Hide whitespace changes
Inline
Side-by-side
ofdock_taskpar_xl/Makefile
View file @
4ea7a602
...
...
@@ -125,7 +125,6 @@ hostbin_HDRS=$(wildcard ./host/inc/*.h) \
hostbin_CXXFLAGS
=
-I
../common/inc/
\
-I
./host/inc/
\
-I
.
\
-I
./wrapcl/inc/
\
$(opencl_CXXFLAGS)
$(xcl2_CXXFLAGS)
$(oclHelper_CXXFLAGS)
\
-std
=
c++0x
\
-U__STRICT_ANSI__
\
...
...
@@ -576,7 +575,6 @@ copy: clean-copy
cp
-r
device/ ../
$(COPY_DIR)
/
$(COPY_DIR_DOCK)
/
cp
-r
host/ ../
$(COPY_DIR)
/
$(COPY_DIR_DOCK)
/
#cp -r input/ ../
$(COPY_DIR)
/
$(COPY_DIR_DOCK)
/
cp
-r
wrapcl/ ../
$(COPY_DIR)
/
$(COPY_DIR_DOCK)
/
cp
-r
../common ../
$(COPY_DIR)
/
cp
-r
../common_xilinx ../
$(COPY_DIR)
/
cp
../conf_sdx174_saruman.sh ../
$(COPY_DIR)
/
...
...
ofdock_taskpar_xl/host/inc/performdocking.h
View file @
4ea7a602
...
...
@@ -14,17 +14,6 @@
#include
"processresult.h"
#include
<CL/opencl.h>
//#include "commonMacros.h"
//#include "listAttributes.h"
//#include "Platforms.h"
//#include "Devices.h"
//#include "Contexts.h"
//#include "CommandQueues.h"
//#include "Programs.h"
#include
"Kernels.h"
//#include "ImportBinary.h"
//#include "ImportSource.h"
#include
"BufferObjects.h"
#include
"xcl2.hpp"
#include
<vector>
...
...
ofdock_taskpar_xl/host/src/main.cpp
View file @
4ea7a602
...
...
@@ -28,7 +28,6 @@ int main(int argc, char* argv[])
clock_t
clock_start_program
,
clock_stop_program
;
clock_start_program
=
clock
();
// ------------------------
...
...
@@ -80,10 +79,6 @@ int main(int argc, char* argv[])
//------------------------------------------------------------
// Calculating energies of reference ligand if required
//------------------------------------------------------------
#if 0
if (mypars.reflig_en_reqired == 1)
print_ref_lig_energies_f(myligand_init, mygrid, floatgrids, mypars.coeffs.scaled_AD4_coeff_elec, mypars.coeffs.AD4_coeff_desolv, mypars.qasp);
#endif
if
(
mypars
.
reflig_en_reqired
==
1
)
{
print_ref_lig_energies_f
(
myligand_init
,
mypars
.
smooth
,
...
...
ofdock_taskpar_xl/wrapcl/inc/BufferObjects.h
deleted
100644 → 0
View file @
c15a9736
#ifndef BUFFER_OBJECTS_H
#define BUFFER_OBJECTS_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/*
Memory objects are represented by cl_mem objects.
They come in two types:
- buffer objects
- image objects
*/
/*
*/
#if 0
int mallocBufferObject(cl_context context,
cl_mem_flags flags,
size_t size,
cl_mem* mem);
#endif
// Modified to support explicit host point
int
mallocBufferObject
(
cl_context
context
,
cl_mem_flags
flags
,
size_t
size
,
void
*
host_pointer
,
cl_mem
*
mem
);
/*
*/
int
getBufferObjectInfo
(
cl_mem
object
);
/*
*/
int
memcopyBufferObjectToDevice
(
cl_command_queue
cmd_queue
,
cl_mem
dest
,
void
*
src
,
size_t
size
);
/*
*/
int
memcopyBufferObjectFromDevice
(
cl_command_queue
cmd_queue
,
void
*
dest
,
cl_mem
src
,
size_t
size
);
/*
*/
int
memcopyBufferObjectToBufferObject
(
cl_command_queue
cmd_queue
,
cl_mem
dest
,
cl_mem
src
,
size_t
size
);
/*
*/
void
*
memMap
(
cl_command_queue
cmd_queue
,
cl_mem
dev_mem
,
cl_map_flags
flags
,
size_t
size
);
/*
*/
int
unmemMap
(
cl_command_queue
cmd_queue
,
cl_mem
dev_mem
,
void
*
host_ptr
);
#endif
/* BUFFER_OBJECTS_H */
ofdock_taskpar_xl/wrapcl/inc/CommandQueues.h
deleted
100644 → 0
View file @
c15a9736
#ifndef COMMAND_QUEUES_H
#define COMMAND_QUEUES_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/*
Create command queue
Inputs:
context -
device_id -
Outputs:
command_queue -
*/
int
createCommandQueue
(
cl_context
context
,
cl_device_id
device_id
,
cl_command_queue
*
command_queue
);
/*
Get devices of the first platform
Inputs:
cmd_queue -
Outputs:
none
*/
int
getCommandQueueInfo
(
cl_command_queue
cmd_queue
);
// Include code for setCommandQueueProperties()?
#endif
/* COMMAND_QUEUES_H */
ofdock_taskpar_xl/wrapcl/inc/Contexts.h
deleted
100644 → 0
View file @
c15a9736
#ifndef CONTEXTS_H
#define CONTEXTS_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/*
Create context
Inputs:
platform_id -
num_devices -
device_id -
Outputs:
context -
*/
int
createContext
(
/*
const cl_context_properties* properties,
*/
cl_platform_id
platform_id
,
cl_uint
num_devices
,
cl_device_id
*
device_id
,
/*
void (*pfn_notify)(const char* errinfo,
const void* private_info,
size_t cb,
void* user_data)
void* user_data,
*/
/*
cl_int* errcode_ret,
*/
cl_context
*
context
);
/*
Get context info
Inputs:
context -
Outputs:
none
*/
int
getContextInfo
(
cl_context
context
);
#endif
/* CONTEXTS_H */
ofdock_taskpar_xl/wrapcl/inc/Devices.h
deleted
100644 → 0
View file @
c15a9736
#ifndef DEVICES_H
#define DEVICES_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/*
Get devices of the first platform
Inputs:
platform_id -
plaformCount -
Outputs:
device_id -
deviceCount -
*/
int
getDevices
(
cl_platform_id
platform_id
,
cl_uint
platformCount
,
cl_device_id
**
device_id
,
cl_uint
*
deviceCount
);
/*
Get devices' attributes
Inputs:
device_id -
deviceCount -
Outputs:
none
*/
int
getDeviceAttributes
(
cl_device_id
*
device_id
,
cl_uint
deviceCount
);
#endif
/* DEVICES_H */
ofdock_taskpar_xl/wrapcl/inc/ImportBinary.h
deleted
100644 → 0
View file @
c15a9736
#ifndef IMPORT_BINARY_H
#define IMPORT_BINARY_H
// L30nardoSV
//#include <stdio.h>
//#include <stdlib.h>
#include
"commonMacros.h"
#include
"Programs.h"
#include
"Kernels.h"
/*
*/
int
load_file_to_memory
(
const
char
*
filename
,
char
**
result
);
/*
*/
int
ImportBinary
(
const
char
*
kernel_xclbin
,
const
char
*
kernel_name
,
cl_device_id
*
device_id
,
cl_context
context
,
/*cl_program* program,*/
const
char
*
options
,
cl_kernel
*
kernel
);
#endif
/* IMPORT_BINARY_H */
ofdock_taskpar_xl/wrapcl/inc/ImportSource.h
deleted
100644 → 0
View file @
c15a9736
#ifndef IMPORT_SOURCE_H
#define IMPORT_SOURCE_H
// L30nardoSV
//#include <stdio.h>
#include
<iostream>
#include
<string.h>
#include
<fstream>
//#include <stdlib.h>
#include
"commonMacros.h"
#include
"Programs.h"
#include
"Kernels.h"
using
namespace
std
;
/*
*/
int
convertToString2
(
const
char
*
filename
,
std
::
string
&
s
);
/*
*/
int
ImportSource
(
const
char
*
filename
,
const
char
*
kernel_name
,
cl_device_id
*
device_id
,
cl_context
context
,
/*cl_program* program,*/
const
char
*
options
,
cl_kernel
*
kernel
);
#endif
/* IMPORT_SOURCE_H */
ofdock_taskpar_xl/wrapcl/inc/Kernels.h
deleted
100644 → 0
View file @
c15a9736
#ifndef KERNELS_H
#define KERNELS_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/*
*/
int
getKernelInfo
(
cl_kernel
kernel
);
/*
*/
int
getKernelWorkGroupInfo
(
cl_kernel
kernel
,
cl_device_id
device
);
/*
*/
int
setKernelArg
(
cl_kernel
kernel
,
cl_uint
num
,
size_t
size
,
const
void
*
ptr
);
/*
*/
int
runKernelTask
(
cl_command_queue
cmd_queue
,
cl_kernel
kernel
,
cl_ulong
*
time_start
,
cl_ulong
*
time_stop
);
/*
*/
int
runKernel1D
(
cl_command_queue
cmd_queue
,
cl_kernel
kernel
,
size_t
gxDimSize
,
size_t
lxDimSize
,
cl_ulong
*
time_start
,
cl_ulong
*
time_stop
);
int
runKernel2D
(
cl_command_queue
cmd_queue
,
cl_kernel
kernel
,
size_t
gxDimSize
,
size_t
gyDimSize
,
size_t
lxDimSize
,
size_t
lyDimSize
,
cl_ulong
*
time_start
,
cl_ulong
*
time_stop
);
int
runKernel3D
(
cl_command_queue
cmd_queue
,
cl_kernel
kernel
,
size_t
gxDimSize
,
size_t
gyDimSize
,
size_t
gzDimSize
,
size_t
lxDimSize
,
size_t
lyDimSize
,
size_t
lzDimSize
,
cl_ulong
*
time_start
,
cl_ulong
*
time_stop
);
#endif
/* KERNELS_H */
ofdock_taskpar_xl/wrapcl/inc/Platforms.h
deleted
100644 → 0
View file @
c15a9736
#ifndef PLATFORMS_H
#define PLATFORMS_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/* Get all available platforms
Inputs:
none
Outputs:
platform_id -
platformCount -
*/
int
getPlatforms
(
cl_platform_id
**
platforms_id
,
cl_uint
*
platformCount
);
/* Get all platforms' attributes
Inputs:
none
Outputs:
platform_id -
platformCount -
*/
int
getPlatformAttributes
(
cl_platform_id
*
platform_id
,
cl_uint
platformCount
);
#endif
/* PLATFORMS_H */
ofdock_taskpar_xl/wrapcl/inc/Programs.h
deleted
100644 → 0
View file @
c15a9736
#ifndef PROGRAMS_H
#define PROGRAMS_H
// L30nardoSV
//#include <stdio.h>
//#include <CL/opencl.h>
#include
"commonMacros.h"
/*
*/
int
getProgramInfo
(
cl_program
program
);
/*
*/
int
getprogramBuildInfo
(
cl_program
program
,
cl_device_id
device
);
#endif
/* PROGRAMS_H */
ofdock_taskpar_xl/wrapcl/inc/commonMacros.h
deleted
100644 → 0
View file @
c15a9736
#ifndef COMMON_MACROS_H
#define COMMON_MACROS_H
// L30nardoSV
//#include <malloc.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<CL/opencl.h>
//#define EXIT_FAILURE -1
// ===============================================
// Platforms -> opencl_lvs/Platforms.cpp
// ===============================================
// #define PLATFORM_ATTRIBUTES_DISPLAY
// ===============================================
// Devices -> opencl_lvs/Devices.cpp
// ===============================================
// #define DEVICE_ATTRIBUTES_DISPLAY
// ===============================================
// Contexts -> opencl_lvs/Contexts.cpp
// ===============================================
// #define CONTEXT_INFO_DISPLAY
// ===============================================
// Commands -> opencl_lvs/CommandQueue.cpp
// ===============================================
// #define CMD_QUEUE_INFO_DISPLAY
// #define CMD_QUEUE_PROFILING_ENABLE
// #define CMD_QUEUE_OUTORDER_ENABLE
// ===============================================
// Programs -> opencl_lvs/Programs.cpp
// ===============================================
// #define PROGRAM_INFO_DISPLAY
// #define PROGRAM_BUILD_INFO_DISPLAY
// ===============================================
// Kernels -> opencl_lvs/Kernels.cpp
// ===============================================
// #define KERNEL_INFO_DISPLAY
// #define KERNEL_WORK_GROUP_INFO_DISPLAY
// ===============================================
// Buffer Objects -> opencl_lvs/BufferObjects.cpp
// ===============================================
// #define BUFFER_OBJECT_INFO_DISPLAY
#endif
ofdock_taskpar_xl/wrapcl/inc/listAttributes.h
deleted
100644 → 0
View file @
c15a9736
#ifndef LIST_ATTRIBUTES_H
#define LIST_ATTRIBUTES_H
// L30nardoSV
//#include <CL/opencl.h>
#include
"commonMacros.h"
// Platforms
extern
const
char
*
attributePlatNames
[
5
];
extern
const
cl_platform_info
attributePlatTypes
[
5
];
extern
const
unsigned
int
attributePlatCount
;
// Devices
extern
const
char
*
attributeDevNames
[
6
];
extern
const
cl_device_info
attributeDevTypes
[
6
];
extern
const
unsigned
int
attributeDevCount
;
extern
const
char
*
attributeUIntDevNames
[
18
];
extern
const
cl_device_info
attributeUIntDevTypes
[
18
];
extern
const
unsigned
int
attributeUIntDevCount
;
extern
const
char
*
attributeULongDevNames
[
5
];
extern
const
cl_device_info
attributeULongDevTypes
[
5
];
extern
const
int
unsigned
attributeULongDevCount
;
extern
const
char
*
attributeSizeTDevNames
[
8
];
extern
const
cl_device_info
attributeSizeTDevTypes
[
8
];
extern
const
unsigned
int
attributeSizeTDevCount
;
extern
const
char
*
attributeBoolDevNames
[
5
];
extern
const
cl_device_info
attributeBoolDevTypes
[
5
];
extern
const
unsigned
int
attributeBoolDevCount
;
#endif
/* LIST_ATTRIBUTES_H */
ofdock_taskpar_xl/wrapcl/src/BufferObjects.cpp
deleted
100644 → 0
View file @
c15a9736
#include
"BufferObjects.h"
#if 0
int mallocBufferObject(cl_context context,
cl_mem_flags flags,
size_t size,
cl_mem* mem){
cl_mem local_mem;
local_mem = clCreateBuffer(context, flags, size, NULL, NULL);
if (!local_mem){
printf("Error: clCreateBuffer()\n");
fflush(stdout);
return EXIT_FAILURE;
}
#ifdef BUFFER_OBJECT_INFO_DISPLAY
cl_int err;
err = getBufferObjectInfo(local_mem);
if (err != CL_SUCCESS){
printf("Error: getBufferObjectInfo() %d\n",err);
fflush(stdout);
return EXIT_FAILURE;
}
#endif
*mem = local_mem;
return CL_SUCCESS;
}
#endif
int
mallocBufferObject
(
cl_context
context
,
cl_mem_flags
flags
,
size_t
size
,
void
*
host_pointer
,
cl_mem
*
mem
){
cl_mem
local_mem
;
local_mem
=
clCreateBuffer
(
context
,
flags
,
size
,
host_pointer
,
NULL
);
if
(
!
local_mem
){
printf
(
"Error: clCreateBuffer()
\n
"
);
fflush
(
stdout
);
return
EXIT_FAILURE
;
}
#ifdef BUFFER_OBJECT_INFO_DISPLAY
cl_int
err
;
err
=
getBufferObjectInfo
(
local_mem
);
if
(
err
!=
CL_SUCCESS
){
printf
(
"Error: getBufferObjectInfo() %d
\n
"
,
err
);
fflush
(
stdout
);
return
EXIT_FAILURE
;
}
#endif
*
mem
=
local_mem
;
return
CL_SUCCESS
;
}
#ifdef BUFFER_OBJECT_INFO_DISPLAY
int
getBufferObjectInfo
(
cl_mem
object
){
cl_int
err
;
cl_mem_object_type
*
mem_object_type
;
cl_mem_flags
*
mem_flags
;
void
**
mem_host_ptr
;
// host ptr that references the memory object's data
size_t
*
mem_size
;
cl_context
*
mem_context
;
/*
cl_mem* mem_assoc_memobject; // only valid for subbuffer objects
size_t* mem_offset; // only valid for subbuffer objects
*/
cl_uint
*
mem_ref_count
;
size_t
sizeParam
;
// ----------------------------------------------------------------------------
// Query Mem object types
printf
(
"
\n
-----------------------------------------------------------------------
\n
"
);
err
=
clGetMemObjectInfo
(
object
,
CL_MEM_TYPE
,
0
,
NULL
,
&
sizeParam
);
if
(
err
!=
CL_SUCCESS
){
printf
(
"Error: clGetMemObjectInfo() %d
\n
"
,
err
);
fflush
(
stdout
);
return
EXIT_FAILURE
;
}
mem_object_type
=
(
cl_mem_object_type
*
)
malloc
(
sizeof
(
cl_mem_object_type
)
*
sizeParam
);
err
=
clGetMemObjectInfo
(
object
,
CL_MEM_TYPE
,
sizeParam
,
mem_object_type
,
NULL
);
if
(
err
!=
CL_SUCCESS
){
printf
(
"Error: clGetMemObjectInfo() %d
\n
"
,
err
);
fflush
(
stdout
);
return
EXIT_FAILURE
;
}