uint*_tをuint_fast*_tに変更
[cuda.git] / binarize / binarize.cu
index 3d8a8bd..90c056f 100644 (file)
@@ -24,7 +24,7 @@
 using namespace FM7b5;
 
 void
-FM7b5::binarize_gpu(ImageGray& out, const ImageGray& in, const uint8_t thres)
+FM7b5::binarize_gpu(ImageGray& out, const ImageGray& in, const uint_fast8_t thres)
 {
        if (in.width() != out.width() || in.height() != out.height()) {
                throw std::runtime_error("sizes of input and output images are diferent.");
@@ -38,7 +38,7 @@ FM7b5::binarize_gpu(ImageGray& out, const ImageGray& in, const uint8_t thres)
                             (height + threads_per_block.y - 1)/ threads_per_block.y);
 
        // allocate input/output memories
-       memory::LinearPitch<uint8_t> d_in(width, height), d_out(width, height);
+       memory::LinearPitch<uint_fast8_t> d_in(width, height), d_out(width, height);
 
        // copy an input image to device memory
        d_in.copy_from(in.data(), bpp * width, height, in.stride());