我对NPP图书馆有一些疑问..。
这是关于NPP参数中的步骤。当我使用NPP库时,我感到很困惑。
nppiSub_32s_C1RSfs(d_sink, step, d_source, step, d_terminals, step, size, 0);
这就是例子..。除步骤外,我能理解所有参数。每个NPP功能都需要这个步骤。
有些人用width..。
有些人用width * sizeof(int)..。(或float.)
有些人通过其他库(如
nppiMalloc_32s_C1(width, height, &step);
我想如果我使用这个库,它可以计算步长。(但我不知道怎么做.)
width或width*sizeof(int),它对性能有影响吗?谢谢你阅读我的问题..。
英语比编程更难..。
发布于 2014-01-24 10:54:16
您可以在文档中阅读4.2.2.1.4中的
The source image line step is the number of bytes between successive rows in the image.
这意味着,如果没有填充,step将被计算为step = (column elements) * sizeof(element datatyp)!当然,如果使用填充,那么填充元素的大小(以字节为单位)也必须添加。
https://stackoverflow.com/questions/21330204
复制相似问题