bool VectorProgram::IsImageFlush(const ImageBase& Source) { if (Source.Width() * Source.NbChannels() * Source.DepthBytes() != Source.Step()) return false; // Image has padding if ((Source.Width() * Source.NbChannels()) % GetVectorWidth(Source.DataType()) != 0) return false; // width is not a multiple of VectorWidth return true; }
bool VectorProgram::IsImageAligned(const ImageBase& Source) { uint BytesPerWorker = Source.DepthBytes() * Source.NbChannels() * GetVectorWidth(Source.DataType()); return (Source.Step() % BytesPerWorker == 0); }