Skip to content

Work around a "dereferencing device pointer in host mode" warning

Dr. Jorrit Fahlke requested to merge work-around-pacxx-dereference-warning into master

Something like this:

/builds/jfahl_01/pacxx-projectseminar-2019/build/pacxx-projectseminar-2019/src/gridoperator.hh:140:81: warning: dereferencing a pointer to device memory is potentially unsafe and inadvisable in host mode
                dp_lop->jacobian_apply_volume(multi_linear_geometry, *dp_rule, *dp_lb, zl, wl, yl);
                                                                                ^~~~~

Funny thing is: the dereferencing happens only on the device, so I don't know why we get this warning. Possibly because it is emitted before the dead code elimination removes the lambda body from the host code? Anyway, the equivalent subscription with [0] does not emit the warning...

Merge request reports