예제 #1
0
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;
}
예제 #2
0
bool VectorProgram::IsImageAligned(const ImageBase& Source)
{
   uint BytesPerWorker = Source.DepthBytes() * Source.NbChannels() * GetVectorWidth(Source.DataType());
   return (Source.Step() % BytesPerWorker == 0);
}