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

Copyright(c) [2009..2012] Trevor L. McDonell
LicenseBSD
Safe HaskellNone
LanguageHaskell98

Foreign.CUDA.Driver.Texture

Contents

Description

Texture management for low-level driver interface

Synopsis

Texture Reference Management

newtype Texture Source

A texture reference

Constructors

Texture 

Fields

useTexture :: Ptr ()
 

data Format Source

Texture data formats

Constructors

Word8 
Word16 
Word32 
Int8 
Int16 
Int32 
Half 
Float 

data AddressMode Source

Texture reference addressing modes

Constructors

Wrap 
Clamp 
Mirror 
Border 

data FilterMode Source

Texture reference filtering mode

Constructors

Point 
Linear 

data ReadMode Source

Texture read mode options

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.

destroy :: Texture -> IO () Source

Deprecated: as of CUDA version 3.2

Destroy 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).

getFilterMode :: Texture -> IO FilterMode Source

Get the filtering mode used by a texture reference

getFormat :: Texture -> IO (Format, Int) Source

Get the data format and number of channel components of the bound texture

setAddressMode :: Texture -> Int -> AddressMode -> IO () Source

Specify the addressing mode for the given dimension of a texture reference

setFilterMode :: Texture -> FilterMode -> IO () Source

Specify the filtering mode to be used when reading memory through a texture reference

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

setReadMode :: Texture -> ReadMode -> IO () Source

Specify additional characteristics for reading and indexing the texture reference