开发者

CUDA compare arrays

Trying to make an app that will compare 1-to-multiple bitmaps. there is one reference bitmap and multiple other bitm开发者_运维技巧aps. Result from each compare should be new bitmap with diffs. Maybe comparing bitmaps rather as textures than arrays? My biggest problem is making kernel accept more than one input pointer, and how to compare the data..

extern "C" __global__ void compare(float *odata, float *idata, int width, int height)

works and following does not (i call the function with enough params)

extern "C" __global__ void compare(float *odata, float *idata, float *idata2, int width, int height)


Your function prototypes are OK. The problem lies elsewhere. In general, make sure that you are properly allocating device memory for all input and output arrays, and make sure that you're correctly copying data to and from your device arrays.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜