X-Git-Url: http://www.fmaj7b5.info/git?p=cuda.git;a=blobdiff_plain;f=binarize%2Fbinarize.cu;fp=binarize%2Fbinarize.cu;h=90c056f421e1c9c163b85dd2a4439ee891621d6e;hp=3d8a8bde3a95eae4193e8acb8e97455620b3b290;hb=9c4ea7a2596620dcb156a00d12bc55c07ba03339;hpb=869779783d0c06c34e02062ac7d23dac316e73a9 diff --git a/binarize/binarize.cu b/binarize/binarize.cu index 3d8a8bd..90c056f 100644 --- a/binarize/binarize.cu +++ b/binarize/binarize.cu @@ -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 d_in(width, height), d_out(width, height); + memory::LinearPitch 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());