Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
2421 Discussions

how can I get the interal pointer of first element in concurrent_vector?

steve3
Beginner
106 Views
I have a class inherited from concurrent_vector, of course the function at and [] can get the reference, but I want to create a function Type* get() to get the first element's address.

How can I do this? I've made some try, but the compiler always generate thsee warning:

tbb/concurrent_vector.h(889): warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized

0 Kudos
1 Reply
Dmitry_Vyukov
Valued Contributor I
106 Views
concurrent_vector does not lie in memory sequentially, so pointer to a first element is not as useful as one may think.
Reply