0

I have some question about NPP library...

This is about Step in NPP parameters. When I use NPP library, it makes me confused.

nppiSub_32s_C1RSfs(d_sink, step, d_source, step, d_terminals, step, size, 0);

that is example.. I can understand all parameters except the step. Every NPP function needs the step.

some people use width...

some people use width * sizeof(int).... (or float...)

some people make the step parameter by other library such as

nppiMalloc_32s_C1(width, height, &step);

I think if I use the library, that calculate step size.(but i don't know how to did...)

  1. What is the step parameter?

  2. How to decide step size?

  3. If I use width or width*sizeof(int), does it have an effect on the performance?

thank you for reading my question....

English is more difficult than programming...

4

1 回答 1

3

您可以在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)如果您使用填充,那么填充元素的字节大小当然也必须添加。

于 2014-01-24T10:54:16.390 回答