MCPcopy Create free account
hub / github.com/CRVI/OpenCLIPP / Image

Method Image

C++/Image.cpp:154–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152// Image
153
154Image::Image(COpenCL& CL, const SImage& Img, void * ImageData, cl_mem_flags flags)
155: Buffer(CL, (char *) ImageData, Img.Height * Img.Step, flags),
156 ImageBase(Img)
157{
158 if (Img.Channels < 1 || Img.Channels > 4)
159 throw cl::Error(CL_IMAGE_FORMAT_NOT_SUPPORTED, "Invalid number of channels");
160
161 if (Img.Channels == 3)
162 throw cl::Error(CL_IMAGE_FORMAT_NOT_SUPPORTED, "Please use ColorImage for 3 channel images");
163
164 if (Img.Type < 0 || Img.Type >= Img.NbDataTypes)
165 throw cl::Error(CL_IMAGE_FORMAT_NOT_SUPPORTED, "Invalid data type");
166}
167
168Image::Image(bool Is3Channel, COpenCL& CL, const SImage& Img, void * ImageData, cl_mem_flags flags)
169: Buffer(CL, (char *) ImageData, Img.Height * Img.Step, flags),

Callers

nothing calls this directly

Calls 4

StepMethod · 0.80
DepthBytesMethod · 0.80
NbChannelsMethod · 0.80
WidthMethod · 0.80

Tested by

no test coverage detected