cuda- FFI binding to the CUDA interface for programming NVIDIA GPUs

Copyright[2009..2017] Trevor L. McDonell
Safe HaskellNone




Texture management for low-level driver interface


Texture Reference Management

newtype Texture Source #

A texture reference




bind :: Texture -> DevicePtr a -> Int64 -> IO () Source #

Bind a linear array address of the given size (bytes) as a texture reference. Any previously bound references are unbound.

bind2D :: Texture -> Format -> Int -> DevicePtr a -> (Int, Int) -> Int64 -> IO () Source #

Bind a linear address range to the given texture reference as a two-dimensional arena. Any previously bound reference is unbound. Note that calls to setFormat can not follow a call to bind2D for the same texture reference.

getAddressMode :: Texture -> Int -> IO AddressMode Source #

Get the addressing mode used by a texture reference, corresponding to the given dimension (currently the only supported dimension values are 0 or 1).

setFormat :: Texture -> Format -> Int -> IO () Source #

Specify the format of the data and number of packed components per element to be read by the texture reference.

create :: IO Texture Source #

Deprecated: as of CUDA version 3.2

Create a new texture reference. Once created, the application must call setPtr to associate the reference with allocated memory. Other texture reference functions are used to specify the format and interpretation to be used when the memory is read through this reference.