[RFC] Offloading Support in libgomp

Michael V. Zolotukhin michael.v.zolotukhin@gmail.com
Fri Sep 13 13:11:00 GMT 2013


> But I doubt dirent.h is portable to all targets we support, so I believe it
> needs another configure test, and perhaps we want to define some macro
> whether we actually support offloading at all (HAVE_DLFCN_H would be one
> precondition, HAVE_DIRENT_H (with opendir etc.) another one (for this the
> question is if we are building libgomp with LFS flags also, i.e. opendir64
> etc. if available) another requirement we have is that sizeof (void *) ==
> sizeof (uintptr_t), etc.
That sounds reasonable, I'll do it.

> I'm afraid strnlen isn't sufficiently portable.  Why don't you just use
> strlen?
strnlen was used as it's more secure than strlen (on non-constant strings).
However, maybe that's not so critical in this place.  And anyway, we could use
strnlen when it's available and strlen otherwise.

> resolve_device should be changed to return struct gomp_device_descr *
> (or NULL for host fallback), and this pthread_once done inside of
> resolve_device, not in all the callers.

> Aliasing violation, don't do that.
Will fix, thanks.

> FYI, I'm attaching a WIP patch with the splay tree stuff.
Thanks, I'll take a look.  By the way, isn't it better to move splay-tree
implementation to a separate file?


Michael
> 	Jakub



More information about the Gcc mailing list