28606

__host__ __device__ — Generic programming in Cuda

Thomas Mejstrik
University of Vienna, Vienna, Austria
arXiv:2309.03912 [cs.PL], (9 Aug 2023)

@misc{mejstrik2023host,

   title={__host__ __device__ — Generic programming in Cuda},

   author={Thomas Mejstrik},

   year={2023},

   eprint={2309.03912},

   archivePrefix={arXiv},

   primaryClass={cs.PL}

}

Download Download (PDF)   View View   Source Source   

496

views

We present patterns for Cuda/C++ to write save generic code which works both on the host and device side. Writing templated functions in Cuda/C++ both for the CPU and the GPU bears the problem that in general both __host__ and __device__ functions are instantiated, which leads to lots of compiler warnings or errors.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2024 hgpu.org

All rights belong to the respective authors

Contact us: