robeverest / cufft

BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

support for more errors in Error.describe #10

Closed amigalemming closed 9 years ago

amigalemming commented 9 years ago
$ git diff Foreign/CUDA/FFT/Error.chs
diff --git a/Foreign/CUDA/FFT/Error.chs b/Foreign/CUDA/FFT/Error.chs
index f8ac1e3..1b8775a 100644
--- a/Foreign/CUDA/FFT/Error.chs
+++ b/Foreign/CUDA/FFT/Error.chs
@@ -32,6 +32,10 @@ describe ExecFailed      = "failed to execute an FFT on the GPU"
 describe SetupFailed     = "the CUFFT library failed to initialize"
 describe InvalidSize     = "invalid transform size"
 describe UnalignedData   = "no longer used"
+describe IncompleteParameterList = "missing parameters in call"
+describe InvalidDevice   = "execution of a plan was on different GPU than plan creation"
+describe ParseError      = "internal plan database error"
+describe NoWorkspace     = "no workspace has been provided prior to plan execution"

 -- Exceptions ------------------------------------------------------------------
@@ -71,4 +75,4 @@ nothingIfOk :: Result -> IO ()
 nothingIfOk status =
     case status of
         Success -> return  ()
-        _       -> throwIO (ExitCode status)
\ No newline at end of file
+        _       -> throwIO (ExitCode status)
tmcdonell commented 9 years ago

Which version of CUDA are you using? These need to be wrapped in a preprocessor #if block because they won't be available in older CUDA versions.

amigalemming commented 9 years ago

On Fri, 24 Oct 2014, Trevor L. McDonell wrote:

Which version of CUDA are you using? These need to be wrapped in a preprocessor #if block because they won't be available in older CUDA versions.

$ dpkg --search cufft.h
cuda-headers-6-0: /usr/local/cuda-6.0/targets/x86_64-linux/include/cufft.h
amigalemming commented 9 years ago

Btw. how old is planMany ?

robeverest commented 9 years ago

I've added the extra errors that came with cuda 6.0. I included version checks so it will still work with older versions. This isn't necessary for planMany as it has been around since cuda 4.1, which is the oldest version that these bindings support.