Intel C++ STM compiler and STL

Intel C++ STM compiler and STL


We are heavily using template metaprogramming for performance, and it seems STM tm_callable is having a viral affect on our codebase.

What happens is that we typically want tm_callable member functions high up in our software architecture. From there the tm_callable's must trickle down the dependency tree until we hit STL functions. We can't wrap those in tm_callable, right?

It's a bit like declaring something const. Once you introduce a const member function, it impacts the call chain and you have to make most everything const.

Does tm_callable support templates at all?

If I declare a base virtual member function with tm_callable, must I declare any virtual override as tm_callable as well? I think this should work like virtual in that it is an inherited property of the member function.

How does one handle third party template libraries (i.e., Boost) or for that matter, the STL?

Also, is there a short-hand form of tm_callable for a class so that I don't have to tediously wrap each member function? Obviously, something like a constructor can only be called by one thread, so the compiler should be clever about this.

Does tm_callable prevent optimizations such as inlining?

Lots of questions, but no documentation that I could find.


2 帖子 / 0 new
Xinmin Tian (Intel)的头像

First of all. Thank you for your feedback. This is what we needed.

Limitation (e.g. we don't support tm_callable on the template in this release) of the Prototype Edition is documented in the User's Guide which you can download.

tm_callable does not prevent optimizations such as inlining.

As you know, this is a prototype edition, not a regular product. The feedback of having class level "annotation" is what we needed, with that,users don't have to "annotate" each member function.

Xinmin Tian