Threading Building Blocks is a library that supports scalable parallel programming using standard C++ code. It does not require special languages or compilers. The ability to use Threading Building Blocks on virtually any processor or any operating system with any C++ compiler makes it very appealing.
i want to write a multi-task framework for both iOS &android. Because of the cross platform reason, tbb takes into my consideration.
i have found Android build instructions in tbb source code. and i notice this script in tbb/build/macos.inc
ifeq (ios,$(target))
ifneq (armv7, $(arch))
$(error $(arch) not supported for target 'ios')
endif
so TBB only support armv7 architecture? and opencv seems not use TBB in IOS too.
NSLog(@"%d", cv::getNumThreads()); //return 512, GCD number
does TBB support IOS well? armv7,armv7s,arm64? or i just should use boost:thread or stl::thread for cross-platform reason? if it supports, how should i build the library?
I have no direct answer to the questions but let me shed some light on the TBB portability. Yes, it is designed to be as portable as practical. And it is open-sourced so that anyone can submit a contribution extending TBB portability. But Intel itself does not test TBB on non-Intel hardware and cannot provide there the same guarantees as for Intel architectures. TBB on ARM architecture is ported and supported by the open-source community.
So, you can modify TBB sources yourself trying to build TBB for iOS (a contribution will be very appreciated) or/and you can reach someone on TBB forum and ask for help doing so or try Internet search to evaluate projects like this one.