You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/09/20 13:55:01 UTC

[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20509: Remove static keyword from a thread_local std::unordered_map

mozga-intel commented on pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509#issuecomment-922949830


   A well-known static keyword is sufficient and is not an error mistake on many counts. I've checked it: if a thread_local specifier declares the variable to have storage duration, then the results show that scope is LOCAL: 
   ```cpp
    40:  0000000000000070   1 TLS       LOCAL   DEFAULT   20 _ZGVZN1A5HELLOEvE4thread_local_var_local (*)
    42:  0000000000000038   56 TLS      LOCAL   DEFAULT   20 _ZZN1A5HELLOEvE4thread_local_var_local (*)
    79:  0000000000400b30   24 FUNC     WEAK    HIDDEN    14 _ZTW5thread_local_var_global
    114: 0000000000000000   56 TLS      GLOBAL  DEFAULT   20 thread_local_var_global
    124: 0000000000400b00   36 FUNC     GLOBAL  DEFAULT   14 _ZTH5thread_local_var_global
   ```
   The latter, the expression relates to another topic: if the compiler version is not greater than  < X, then implementation of a thread_local is used - It means that internal function is not used. Removing static keywords can affect a UT. Due to it, that modification can not displace static keywords in the second case.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org