Intel® Threading Building Blocks

Sort two arrays simultaneously using TBB sort

Hi

The problem I am having is as follows,

1) I have arrays A and B of size N.

2) I have to sort A and also make B in the same sorted permutation as that of A.

This is how currently I have implemented in my code using TBB sort. But I find that the in-place re-ordering algorithm is a serial implementation and is a major bottleneck in my code. How can I do this more efficiently using only TBB sort and possibly avoid the use of permutation array ?

std::vector<unsigned> order(N);

std::vector<double> A(N), B(N);

 

tbb concurrent_hash_map in shared memory

I am using dpdk shared memory. So it "map the hugepage memory to the same virtual addresses in client and server applications"(exact memory mapping).

I need a hash between processes.

I can see from your documenatation that concurrent_hash_map  is good between threads.

If i use dpdk shared memory, and initialize concurrent_hash_map  in shared memory, will i be able to use concurrent_hash_map in shared memory same way as between threads?

tbb:task has its own context?

Does a tbb::task have its own context, e.g. its own stack like coroutines or fibers?

I try to evaluate if it is possible to write code similiar to GO-routines with TBB, e.g. each task has it's own stack, can be suspended iit's current stackframe and resumed later (maybe while waiting for some external event).
 

Flow graph queueing nodes hold input references

I have a flow graph where the objects are too heavy to pass by copy, so instead I'm passing a shared pointer to the object through the graph. What I noticed is that my deleters for some of those objects were being deferred until graph destruction because the graph nodes were holding copies, which is too late for my needs. I had expected them to hold references for only as long as those objects were active in the graph.

X Window System support

I just installed a GNU/Linux Ubuntu 12.04.4 LTS server (Amazon EC2 image in case it's relevant) with "sudo apt-get install xorg-dev", but tbb42_20140122oss/examples/common/gui/Makefile.gmake would not recognise the installed libraries (see http://packages.ubuntu.com/precise/libx11-dev, [list of files], to see what paths were used instead). I don't remember this being an issue with the Ubuntu desktop installation on my previous laptop computer, which is a bit strange.

Design pattern for ordered traversal

I'm new to Threading Building Blocks and need a design pattern to parallelize an existing divide and conquer loop. Superficially, it works like this:

foreach element in container
    if element can be pruned
        continue
    else if element is divisible
        divide element into 4 smaller elements
    else
        conquer element

So far, no problem for TBB. Just use a parallel_for over a std::vector and a tbb::parallel_invoke (or something) for the subdivision.

cross compile on arm

I'm trying to compile tbb on a Cortex-A8 core running linux. 

My cross compilation environment is as follows:
Host: Ubuntu 12.04 64bit
Target:MontaVista Linux (ARM)
Cross Compiler:Sourcery G++ Lite 2009q1-203
TBB version: tbb42_20131003oss

My compilation steps are belos:

1. modified ../build/linux.gcc.inc

CPLUS = /home/zmz/Software/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-g++
CONLY = /home/zmz/Software/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc

Intel® Threading Building Blocks abonnieren