예제 #1
0
bool SameType(const ImageBase& Img1, const ImageBase& Img2)
{
   return (Img1.IsFloat() == Img2.IsFloat() &&
      Img1.IsUnsigned() == Img2.IsUnsigned() &&
      Img1.Depth() == Img2.Depth() &&
      Img1.NbChannels() == Img2.NbChannels());
}
예제 #2
0
void CheckSizeAndType(const ImageBase& Img1, const ImageBase& Img2)
{
   CheckCompatibility(Img1, Img2);

   if (Img1.Depth() != Img2.Depth())
      throw cl::Error(CL_INVALID_VALUE, "Different image depth used");

   if (Img1.IsUnsigned() != Img2.IsUnsigned())
      throw cl::Error(CL_INVALID_VALUE, "Different image types used");
}
예제 #3
0
void CheckCompatibility(const ImageBase& Img1, const ImageBase& Img2)
{
   CheckSameSize(Img1, Img2);

   if (Img1.IsFloat() != Img2.IsFloat())
      throw cl::Error(CL_INVALID_VALUE, "Different image types used");

   if (Img1.IsUnsigned() != Img2.IsUnsigned())
     throw cl::Error(CL_INVALID_VALUE, "Different image types used");
}