Portability | non-portable (GHC extensions) |
---|---|
Stability | experimental |
Maintainer | Martin Dybdal <dybber@dybber.dk> |
Loading and compilation of OpenCL programs.
- createProgram :: Context -> String -> IO Program
- createProgramWithBinary :: Context -> [(DeviceID, ByteString)] -> IO Program
- buildProgram :: Program -> [DeviceID] -> String -> IO ()
- unloadCompiler :: IO ()
- programContext :: Program -> IO Context
- programDevices :: Program -> IO [DeviceID]
- programSource :: Program -> IO String
- programBinaries :: Program -> IO [(DeviceID, ByteString)]
Documentation
:: Context | The context to associate the program with |
-> String | The program source |
-> IO Program | The newly created program |
Create a program from a string containing the source code
:: Context | The context to associate the program with |
-> [(DeviceID, ByteString)] | Binary program specific to different devices |
-> IO Program | The newly created program |
Create a program from the ByteStrings obtained from programBinaries
:: Program | The program to compile |
-> [DeviceID] | List of devices to compile for |
-> String | Compiler arguments, see OpenCL specification for possible values. |
-> IO () |
Compile a program for a given set of devices.
unloadCompiler :: IO ()
Hints to the OpenCL implementation that the resources allocated
by the OpenCL compiler can be released. It does not guarantee that
the compiler will not be used in the future or that the compiler
will actually be unloaded by the implementation. Calls to
buildProgram
after unloadCompiler
will reload the compiler, if
necessary, to build the appropriate program executable.
programContext :: Program -> IO Context
The context to which the Program
is associated
programDevices :: Program -> IO [DeviceID]
The devices to which the Program
is associated
programSource :: Program -> IO String
The source code of the Program
as specified in the call to
createProgram. If program is created using createProgramWithBinary,
an empty string or the appropriate program source code is returned
depending on whether or not the program source code is stored in
the binary.
programBinaries :: Program -> IO [(DeviceID, ByteString)]
Collects binaries for an unspecified subset of the devices
associated with the Program
(depending on which it is compiled
to)