Clang does not generate `__kmpc_threadprivate_register_vec` for threadprivate arrays of objects

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Clang does not generate `__kmpc_threadprivate_register_vec` for threadprivate arrays of objects

Oleg Smolsky via cfe-dev

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.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Openmp-dev] Clang does not generate `__kmpc_threadprivate_register_vec` for threadprivate arrays of objects

Oleg Smolsky via cfe-dev
Most probably,  because it is not required. Everything works with the regular runtime function. 

Best regards,
Alexey Bataev

21 нояб. 2018 г., в 0:43, Simone Atzeni via Openmp-dev <[hidden email]> написал(а):

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.

_______________________________________________
Openmp-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev