Commit 668ef943 authored by kwm's avatar kwm
Browse files

Add ocl-icd - OpenCL Installable Client Driver.

This library provides a way that OpenCL programs can open several
ICD's. The Intel (beignet) and AMD/ATI (Clover for Mesa) OpenCL
implimentations will be build as ICD's. This has as benefit
that programs will not link directly against the OpenCL
implimentation but against ocl-icd. The user needs to manualy
install the OpenCL implimentation they want to use.

PR:		181244
Submitted by:	ohartman@zedat.fu-berlin.de
parent 13653360
......@@ -1536,6 +1536,7 @@
SUBDIR += ocaml-xstr
SUBDIR += ocaml-xstrp4
SUBDIR += ocfpcsc
SUBDIR += ocl-icd
SUBDIR += ode
SUBDIR += ois
SUBDIR += okteta
......
# Created by: Koop Mast <kwm@FreeBSD.org>
# $FreeBSD$
PORTNAME= ocl-icd
PORTVERSION= 2.2.7
CATEGORIES= devel
MASTER_SITES= https://forge.imag.fr/frs/download.php/667/
MAINTAINER= ohartman@zedat.fu-berlin.de
COMMENT= OpenCL Installable Client Driver
LICENSE= BSD2CLAUSE
BUILD_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
CONFLICTS= freeocl-[0-9]* opencl-icd-[0-9]*
USE_RUBY= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
RUBY_NO_RUN_DEPENDS=yes
USES= gmake libtool pathfix
INSTALL_TARGET= install-strip
CONFIGURE_ARGS+=--disable-official-khronos-headers
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= MANPAGES
OPTIONS_DEFAULT=MANPAGES
OPTIONS_SUB= yes
MANPAGES_BUILD_DEPENDS= xmlto:${PORTSDIR}/textproc/xmlto \
asciidoc:${PORTSDIR}/textproc/asciidoc
post-patch:
@${REINPLACE_CMD} -e 's|/etc/|${LOCALBASE}/etc/|g' \
${WRKSRC}/doc/libOpenCL.7.txt
.include <bsd.port.mk>
SHA256 (ocl-icd-2.2.7.tar.gz) = be78886c83b903dd5861f35d62d473e4228b3c13e25535a8665c87cb8a51390b
SIZE (ocl-icd-2.2.7.tar.gz) = 450053
--- ocl_icd_debug.h.orig 2015-08-06 20:54:47 UTC
+++ ocl_icd_debug.h
@@ -61,9 +61,9 @@ extern int debug_ocl_icd_mask;
return ret; \
} while(0)
# define RETURN_STR(val) do { \
- char* ret=(char*)(val); \
- debug(D_TRACE, "return: %s", ret); \
- return ret; \
+ char* _return_str=(char*)(val); \
+ debug(D_TRACE, "return: %s", _return_str); \
+ return _return_str; \
} while(0)
# ifdef DEBUG_OCL_ICD_PROVIDE_DUMP_FIELD
# pragma GCC diagnostic push
--- ocl_icd_loader.c.orig 2015-06-08 18:29:52 UTC
+++ ocl_icd_loader.c
@@ -49,13 +49,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
#define DEBUG_OCL_ICD_PROVIDE_DUMP_FIELD
#include "ocl_icd_debug.h"
-#define ETC_OPENCL_VENDORS "/etc/OpenCL/vendors"
+#define ETC_OPENCL_VENDORS "/usr/local/etc/OpenCL/vendors"
int debug_ocl_icd_mask=0;
typedef __typeof__(clGetPlatformInfo) *clGetPlatformInfo_fn;
-inline void dump_vendor_icd(const char* info, const struct vendor_icd *v) {
+static inline void dump_vendor_icd(const char* info, const struct vendor_icd *v) {
debug(D_DUMP, "%s %p={ num=%i, handle=%p, f=%p}\n", info,
v, v->num_platforms, v->dl_handle, v->ext_fn_ptr);
}
OpenCL implementations are provided as ICD (Installable Client Driver). An
OpenCL program can use several ICD thanks to the use of an ICD Loader as
provided by this project. This free ICD Loader can load any (free or non
free) ICD.
WWW: https://forge.imag.fr/projects/ocl-icd/
include/ocl_icd.h
lib/libOpenCL.so
lib/libOpenCL.so.1
lib/libOpenCL.so.1.0.0
libdata/pkgconfig/OpenCL.pc
libdata/pkgconfig/ocl-icd.pc
%%MANPAGES%%man/man7/libOpenCL.7.gz
%%MANPAGES%%man/man7/libOpenCL.so.7.gz
%%PORTDOCS%%%%DOCSDIR%%/examples/ocl_icd_bindings.c
%%MANPAGES%%%%PORTDOCS%%%%DOCSDIR%%/html/libOpenCL.html
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