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

Method GetRange

C++/programs/Program.cpp:315–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315cl::NDRange VectorProgram::GetRange(EProgramVersions Version, const ImageBase& Img1)
316{
317 switch (Version)
318 {
319 case Fast:
320 // The fast version uses a 1D range
321 return cl::NDRange(Img1.Width() * Img1.Height() * Img1.NbChannels() / GetVectorWidth(Img1.DataType()), 1, 1);
322
323 case Standard:
324 case Unaligned:
325 // The other versions use a 2D range
326 return Img1.VectorRange(GetVectorWidth(Img1.DataType()));
327
328 case NbVersions:
329 default:
330 throw cl::Error(CL_INVALID_PROGRAM, "Invalid program version in VectorProgram");
331 }
332
333}
334
335cl::NDRange VectorProgram::GetRange(const ImageBase& Img1)
336{

Callers

nothing calls this directly

Calls 6

GetRangeFunction · 0.85
WidthMethod · 0.80
HeightMethod · 0.80
NbChannelsMethod · 0.80
DataTypeMethod · 0.80
VectorRangeMethod · 0.80

Tested by

no test coverage detected