nvtt
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
nvtt::GPUInputBuffer Struct Reference

Structure containing all the input images from device memory. The image data is reordered by tiles. More...

#include <nvtt_lowlevel.h>

Public Member Functions

NVTT_API GPUInputBuffer (const RefImage *images, ValueType value_type, int numImages=1, int tile_w=4, int tile_h=4, float WeightR=1.0f, float WeightG=1.0f, float WeightB=1.0f, float WeightA=1.0f, nvtt::TimingContext *tc=nullptr, unsigned *num_tiles=nullptr)
 Construct a GPUInputBuffer from 1 or more RefImage structs.
 
NVTT_API GPUInputBuffer (const CPUInputBuffer &cpu_buf, int begin=0, int end=-1, nvtt::TimingContext *tc=nullptr)
 Construct a GPUInputBuffer from a CPUInputBuffer.
 
NVTT_API ~GPUInputBuffer ()
 Destructor.
 
NVTT_API int NumTiles () const
 The total number of tiles of the input buffer.
 
NVTT_API void TileSize (int &tile_w, int &tile_h) const
 Tile Size.
 
NVTT_API ValueType Type () const
 Value type. The same as the input images of the CPUInputBuffer used for creating this object.
 

Public Attributes

Private * m
 

Detailed Description

Structure containing all the input images from device memory. The image data is reordered by tiles.

Constructor & Destructor Documentation

◆ GPUInputBuffer() [1/2]

NVTT_API nvtt::GPUInputBuffer::GPUInputBuffer ( const RefImage * images,
ValueType value_type,
int numImages = 1,
int tile_w = 4,
int tile_h = 4,
float WeightR = 1.0f,
float WeightG = 1.0f,
float WeightB = 1.0f,
float WeightA = 1.0f,
nvtt::TimingContext * tc = nullptr,
unsigned * num_tiles = nullptr )

Construct a GPUInputBuffer from 1 or more RefImage structs.

The input images should use the same value type. images[i].data should point to GPU global memory here (more specifically, a CUDA device pointer). num_tiles can be used to return the number of tiles of each input image after reordering.

◆ GPUInputBuffer() [2/2]

NVTT_API nvtt::GPUInputBuffer::GPUInputBuffer ( const CPUInputBuffer & cpu_buf,
int begin = 0,
int end = -1,
nvtt::TimingContext * tc = nullptr )

Construct a GPUInputBuffer from a CPUInputBuffer.

begin/end can be used to sepcify a range of tiles to copy from the CPUInputBuffer. end = -1 means the end of the input buffer.


The documentation for this struct was generated from the following file: