开发者

CUDA compare arrays

开发者 https://www.devze.com 2022-12-26 21:30 出处:网络
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

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

精彩评论

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