- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#define __TBB_VERSION_STRINGS(N) \
#N": BUILD_HOST imbeu025 (x86_64)" ENDL \
#N": BUILD_OS Ubuntu 18.04.2 LTS" ENDL \
#N": BUILD_KERNEL Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019" ENDL \
#N": BUILD_GCC g++ (GCC) 7.4.0" ENDL \
#N": BUILD_LIBC 2.27" ENDL \
#N": BUILD_LD " ENDL \
#N": BUILD_TARGET intel64 on cc7.4.0_libc2.27_kernel4.15.0" ENDL \
Hello.
I want to use tbb::task::suspend/resume if I'm inside a TBB task and a regular semaphore otherwise. How can I check if the current function is run from inside a TBB task? Is the condition "tbb::task::self().state() == tbb::task::executing" good enough?
- Tags:
- CC++
- Development Tools
- General Support
- Intel® Threading Building Blocks
- Optimization
- Parallel Computing
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the documentation it should work -- have you tried this API? Any problems? Can you describe the overall problem that you work on? Just in case, here is a reference to the page that describes how TBB tasking works:
https://www.threadingbuildingblocks.org/docs/help/tbb_userguide/How_Task_Scheduling_Works.html ;
At the end of the article -- the short description of Fibonacchi example illustrating the reference counting mechanism
specifically, using set_ref_count API which also could be used to see if the reference count is zero which would indicate that task is not longer running.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page