Skip to content

Commit 34c78cc

Browse files
committed
gj_pp_channel_remap: auto+doxy
- deduce the type with (auto *) rather than decltype() (compat with gcc 5/cuda 8) - write short Doxygen documentation
1 parent fbf9db1 commit 34c78cc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gpujpeg_preprocessor.cu

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,10 @@ channel_remap_kernel(uint8_t* data, int width, int pitch, int height, unsigned i
513513
gpujpeg_comp_to_raw_store<pixel_format>(data, width, height, offset, x, y, r);
514514
}
515515

516+
/**
517+
* remaps color channels according to coder->preprocessor.channel_remap
518+
* if requested by user (with an option)
519+
*/
516520
int
517521
gpujpeg_preprocessor_channel_remap(struct gpujpeg_coder* coder, cudaStream_t stream)
518522
{
@@ -532,7 +536,7 @@ gpujpeg_preprocessor_channel_remap(struct gpujpeg_coder* coder, cudaStream_t str
532536
coder->param_image.width_padding;
533537
dim3 grid((width + block.x - 1) / block.x, (height + block.y - 1) / block.y);
534538

535-
decltype(channel_remap_kernel<GPUJPEG_U8>)* kernel = nullptr;
539+
auto* kernel = channel_remap_kernel<GPUJPEG_U8>;
536540
#define SWITCH_KERNEL(pf) \
537541
case pf: \
538542
kernel = channel_remap_kernel<pf>; \

0 commit comments

Comments
 (0)