From 589a6b0f1c5916a6201a2653cc6d9f958300b69c Mon Sep 17 00:00:00 2001 From: Simon Danisch Date: Mon, 13 Jun 2016 14:54:41 +0200 Subject: [PATCH 1/3] add windows support --- src/config.jl | 4 ++-- src/error.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.jl b/src/config.jl index 19907e2..82a6074 100644 --- a/src/config.jl +++ b/src/config.jl @@ -2,10 +2,10 @@ let global af_lib succeeded = false if !isdefined(:af_lib) - @unix ? begin lib = "libaf" end : nothing + lib = @unix ? begin "libaf" end : @windows ? "af" : "" Libdl.dlopen(lib) succeeded = true - succeeded || error("Gunrock library not found") + succeeded || error("ArrayFire library not found") @eval const af_lib = $lib end end diff --git a/src/error.jl b/src/error.jl index 512172b..acec75e 100644 --- a/src/error.jl +++ b/src/error.jl @@ -45,7 +45,7 @@ export AF_SUCCESS, AF_ERR_UNKNOWN function throwAFerror(err::Integer) - str = ccall((:af_err_to_string, "libaf"), + str = ccall((:af_err_to_string, af_lib), Cstring, (Cint, ), err) throw("ArrayFire Error ($err) : $(bytestring(str))") end From 195f8371c8e2243e142a7f99adf8f7090367016a Mon Sep 17 00:00:00 2001 From: Simon Danisch Date: Mon, 13 Jun 2016 14:57:55 +0200 Subject: [PATCH 2/3] update readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 78585b7..7330027 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,15 @@ Pkg.test("ArrayFire") ``` If you have any issues getting `ArrayFire.jl` to work, please check the Troubleshooting section below. If it still doesn't work, please file an issue. +#Windows +Just downdload the [installer](http://arrayfire.com/download/) (you need to create an account). +Follow the installation steps and make sure that you include the library directory into the PATH variable as adviced by the installer. +Now try: +```julia +Pkg.add("ArrayFire") +Pkg.test("ArrayFire") +``` + ## Simple Usage Congratulations, you've now installed `ArrayFire.jl`! Now what can you do? From edecd0066758dd1be34ff0e9a347effd833f565e Mon Sep 17 00:00:00 2001 From: Simon Danisch Date: Thu, 16 Jun 2016 09:04:10 -0400 Subject: [PATCH 3/3] fix typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7330027..89f0e07 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ Pkg.test("ArrayFire") If you have any issues getting `ArrayFire.jl` to work, please check the Troubleshooting section below. If it still doesn't work, please file an issue. #Windows -Just downdload the [installer](http://arrayfire.com/download/) (you need to create an account). -Follow the installation steps and make sure that you include the library directory into the PATH variable as adviced by the installer. +Just download the [installer](http://arrayfire.com/download/) (you need to create an account). +Follow the installation steps and make sure that you include the library directory into the PATH variable as advised by the installer. Now try: ```julia Pkg.add("ArrayFire")