[cfe-dev] Clang does not generate `__kmpc_threadprivate_register_vec` for threadprivate arrays of objects

Simone Atzeni via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 20 21:43:46 PST 2018


Hi,

Given an array of objects declared OpenMP threadprivate, such as:

myclass x[4];
#pragma omp threadprivate (x)

Clang generates a call to ` __kmpc_threadprivate_register` instead of ` __kmpc_threadprivate_register_vec`.
The ` __kmpc_threadprivate_register` gets as size "sizeof(myclass) * array_size" so it works just fine, but I was wondering why not using the `__kmpc_threadprivate_register_vec` provided in the runtime?
Is there a particular reason?

Thanks.
Simone

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181121/114fde38/attachment.html>


More information about the cfe-dev mailing list