35 static const char*
getName(StorageType);
37 static const char* getStorageString(StorageType);
40 {
return t ==
INT8 ? 1 : (t ==
INT16 || t == FLOAT16) ? 2 : 4; }
62 return myBuffer() != 0;
87 void readIn(
const void*
src,
bool blocking =
true);
92 void writeOut(
void*
dst,
bool blocking =
true)
const;
107 int64 totalMemory()
const;
147 return indexToPos(x, y, z, pos, myWidth, myHeight);
152 static bool indexToPos(
int x,
int y,
int z,
UT_Vector3F& pos,
int w,
int h);
171 template <
typename T>
183 template <
typename T>
189 template <CE_Image::StorageType STORAGE>
static bool storesIntegers(StorageType t)
getFileOption("OpenEXR:storage") storage
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
GLdouble GLdouble GLdouble z
void swap(T &lhs, T &rhs)
int getWidth() const
Returns the image's width.
__hostdev__ void setValue(uint32_t offset, bool v)
bool indexToPos(int x, int y, int z, UT_Vector3F &pos) const
int getChannels() const
Returns the number of channels per pixel.
GLint GLsizei GLsizei height
Type traits for a given storage type...
void CE_API CEfillFlatStorageFromVoxelArray(void *dest, const UT_VoxelArray< T > &src, CE_Image::StorageType storage)
void CE_API CEfillVoxelArrayFromFlatStorage(UT_VoxelArray< T > &dest, const void *src, CE_Image::StorageType storage)
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
cl::Buffer myBuffer
OpenCL descriptor for the actual GPU buffer.
int getHeight() const
Returns the image's height.
static const int DataSize
GLfloat GLfloat GLfloat GLfloat h
SIM_API const UT_StringHolder force
int myWidth
Sizes of the buffer.
Kernel functor interface.
static int getBytes(StorageType t)
Kernel interface that implements cl_kernel.
GLubyte GLubyte GLubyte GLubyte w
StorageType getStorage() const
Identifies the type of data stored for each channel of every pixel.
const cl::Buffer & buffer() const
Returns this buffer descriptor.
ImageBuf OIIO_API channels(const ImageBuf &src, int nchannels, cspan< int > channelorder, cspan< float > channelvalues={}, cspan< std::string > newchannelnames={}, bool shuffle_channel_names=false, int nthreads=0)