Threading Building Blocks
BlitzMax Forums/BlitzMax Programming/Threading Building Blocks
| ||
Does anyone of the pro's outside see a chance to port this technically to bmax? The Lib is LGPL and should work on Win, Linux and Mac OSX. What I could not see, it if is possible to wrap all this C++ templates around to BMAX. The libs provides many useful things for creating programs wich can use multicores quite effeciently. Link: http://threadingbuildingblocks.org/ |
| ||
What's the point? BlitzMax isn't thread safe. |
| ||
The GC is not threadsafe - also big parts of the STL in C++ are not threadsafe. As far as I unterstand, the library give some essential basics as shared memory, mutexes and a thread scheduler |
| ||
Ok, but for those of us who know next to nothing about threading, if this were made to work in BlitzMax, what would you be able to do, bearing in mind the aforementioned non-threadsafe areas with BlitzMax? |
| ||
What's the point? BlitzMax isn't thread safe. If you can't write thread safe code, you shouldn't be using threads.I am using threads in my BM windows project, and not having any problems. |
| ||
This is from Intel-FAQ: "Threading Building Blocks includes algorithms, highly concurrent containers, locks and atomic operations, a task scheduler and a scalable memory allocator. These components in TBB can be used individually or all together to ease C++ development for multi-core." The idea behind ist, not to create threads, but "tasks". The scheduler inside the library manages to distribute it in a very efficient way onto the different cores (including optimisation on cache usage) The lib has templates for: parallel_for parallel_reduce parallel_scan parallel_while pipeline parallel_sort task It also implements: concurrent_hash_map concurrent_vector concurrent_queue Furhtermore: Memory Allocator Task Scheduler |
| ||
robobimbo: What platform are you targeting? |
| ||
Basicly win32 for my personal needs :) |
| ||
If you can't write thread safe code, you shouldn't be using threads. I am using threads in my BM windows project, and not having any problems. Oh right, I just won't worry my pretty little head about it then, eh? |
| ||
Basicly win32 for my personal needs :) Why are you looking at Intel's solution instead of using the threading built into the Windows API? Oh right, I just won't worry my pretty little head about it then, eh? Hey man, I am sorry. I didn't mean to sound mean. |
| ||
Unfortunately the windows API provides none of the higher level constructs such as the hash map. The intel sollution is also very efficient on amd cpus |
| ||
Gotcha. Was just curious ;c) |
| ||
Sure Intels solution is efficient. Intel writes one of the most capable highly parallel compilers for cluster computers, ICC actually :) |