- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm completely newbie to TBB, i want to use "concurrent_bounded_queue" in my application (i do not plan to use any other parts of TBB if this matters)
I've downloaded and extracted TBB, now I have tbb43_20140724oss folder on my PC.
What next steps should I do to use "concurrent_bounded_queue" from VS2012 (MS VC++ compiler)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In general, you have to do three things:
1. make sure the TBB headers are found by the compiler, i.e., making sure the include paths also contain tbb43_20140724oss/include. Note that it should really by that folder, not the tbb subfolder of the include, because you should put that tbb as part of the include, i.e., #include <tbb/concurrent_queue.h>
2. make sure the right lib files are found by the linker. The libs are found in tbb43_20140724oss/lib, but you also have to choose the right architecture and compiler
3. link you binary with the tbb libs.
However, it is possible, that in your case, you could get away with just 1. It is possible, that the concurrent_bounded_queue is (as a template) completely implemented in the headers, as well as all the other classes used by the queue.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In general, you have to do three things:
1. make sure the TBB headers are found by the compiler, i.e., making sure the include paths also contain tbb43_20140724oss/include. Note that it should really by that folder, not the tbb subfolder of the include, because you should put that tbb as part of the include, i.e., #include <tbb/concurrent_queue.h>
2. make sure the right lib files are found by the linker. The libs are found in tbb43_20140724oss/lib, but you also have to choose the right architecture and compiler
3. link you binary with the tbb libs.
However, it is possible, that in your case, you could get away with just 1. It is possible, that the concurrent_bounded_queue is (as a template) completely implemented in the headers, as well as all the other classes used by the queue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for detailed response.
I've just included <tbb/concurrent_queue.h> (not used it even!) and compiler already asks me for tbb.lib, so I have to use libs too.
I'm using VS2012 and don't know which lib folder to use vc11 or vc11_ui. I just tried "vc11" and it works
Also to execute my program I should add dll's from "bin" folder, of course.
After that everything works fine, so far I'm able to compile and execute my program.
Can I link tbb statically (how?) What is the difference between vc11 and vc11_ui?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also it's interesting to know what is the difference between
void push (const T &source) Enqueue an item at tail of queue.
and
void push (T &&source) Move an item at tail of queue.
Probably it makes sense to document the difference between these two functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The difference between & and && is a general C++11 issue and needs no further explanation here, although it is strange to see "enqueue" vs. "move" because both are enqueued.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page