Skip to content

Commit d70525a

Browse files
committed
Adjust the loaders for macOS.
1 parent 9e311de commit d70525a

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/loaders/libclblas.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
88
static const char libname[] = "clBLAS.dll";
99
#else /* Unix */
10+
#ifdef __APPLE__
11+
static const char libname[] = "libclBLAS.dylib";
12+
#else
1013
static const char libname[] = "libclBLAS.so";
1114
#endif
15+
#endif
1216

1317
#define DEF_PROC(ret, name, args) t##name *name
1418

src/loaders/libclblast.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
#include "gpuarray/error.h"
66

77
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
8-
static const char libname[] = "clBLAST.dll";
8+
static const char libname[] = "clblast.dll";
99
#else /* Unix */
10-
static const char libname[] = "libclBLAST.so";
10+
#ifdef __APPLE__
11+
static const char libname[] = "libclblast.dylib";
12+
#else
13+
static const char libname[] = "libclblast.so";
14+
#endif
1115
#endif
1216

1317
#define DEF_PROC(ret, name, args) t##name *name

src/loaders/libopencl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
88
static char libname[] = "OpenCL.dll";
99
#else /* Unix */
10+
#ifdef __APPLE__
11+
static char libname[] = "OpenCL.framework/OpenCL";
12+
#else
1013
static char libname[] = "libOpenCL.so";
1114
#endif
15+
#endif
1216

1317
#define DEF_PROC(ret, name, args) t##name *name
1418

0 commit comments

Comments
 (0)