~/talk

Bridging the Gap: Writing Portable C++ Programs for CPU and GPU

links:none on file
slides:none on file

Concrete patterns and tradeoffs for running the same C++ code on NVIDIA GPUs (CUDA) and CPUs, with compiler-tested examples: how nvcc vs clang differ, a quiz that shows nvcc producing a silent undefined-behavior instantiation, use of macros to fake __host__/__device__ for non‑CUDA builds, the pitfalls of Host device everything and Constexpr everything (experimental relaxed constexpr can silently change semantics), macro/micro solutions for Conditional Host Device Template, and a language proposal for conditional host/device annotations.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 0:31CUDA crash course and quiz
  3. 5:54Analyzing bad cross-function calls
  4. 12:56Early patterns and workarounds
  5. 16:36Handling conditional logic
  6. 21:11Constexpr and experimental features
  7. 25:56Disabling CUDA compiler warnings
  8. 31:16Host-device template patterns
  9. 38:10Function dispatching
  10. 41:17Proposals and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.