Intel® Threading Building Blocks

Return an 2D array in parallel_for

Hi,

How can I return back the 2D Array after parallel_for to main code?

I have tried to do that, but unluckly I couldnt manage to return the array and accessing a wrong memory location. The source per below:

const size_t M = 1000;

const size_t N = 1000;

class pSubstitutionClass {

public:

int (*my_a)[N];

int (*my_xor1);

void operator()(const blocked_range2d& r) const {

int (*a)[N] = my_a;

int (*xor1) = my_xor1;

for (size_t i = r.rows().begin(); i!=r.rows().end(); i++)

Number of collisions in concurrent_hash_map?

Hello everybody,

I currently use the concurrent_hash_map, and, seeing the poor performances of my app, I profiled a little my code and see that 30% of the time is spent if the lookup. So, I was wondering if there is a way to know the number of collisions in the hash map? There is nothing about this in the documentation. I also made some grep into the tbb sources, but I found nothing.

test_halt.exe hangs (v2.1)

Hello,

I've tried to build tbb2.1(commercially aligned release)ona Xeon server but 'text_halt.exe' hangs while "make all".

text_halt.exe linked with libtbb_debug.so passed the test run.

only therelease version hangs.

Any comments?

Here is the system information:

CPU:two Xeon E5345 processors

OS: linux kernel 2.6.23.1

Compiler: gcc 4.1.2 with libc 2.6

Port to PowerPC + Linux (Cell B.E.)

After two unsuccessful attempts to port TBB to PowerPC (64-bit) running Linux, first with tbb20_20080207, then tbb21_20080622 (both sometimes hanging/spinning, nondeterministically, in one of the tests), I applied Raf Schietekat's "Atomic" mods (Ver. 8.0) to tbb21_20080605, made some straightforward changes to the Makefiles and a couple of changes to his file gcc_power.h (one non-essential), and it seems to work. This is on a Cell B.E. processor. If there's any interest I'll upload the diffs.

Help in 2D Array

Hi all,

Just started my way into TBB. I have 2 question, and I need your help on it.

*1st: How to parallelize 2D array? The serial code that i want to parallelize is:

for(i=0;i<8;i++)
{
for(j=0;j<6;j++)
{
a[i][j]=xor1[k++];
}
}

*2nd: If the code above is located in a class, how should I construct the parallel class ? will "Struct" work inside a class ?

Waiting to hear from you

Thanks & Regards

Munzer

Branching pipelines

I'm just getting started with TBB, and am having problems trying to model something in this framework. Suppose I have an input sequence of data items consisting of a mixture of fruit, e.g. apples, pears and oranges. The processing I need to do on each of these fruit depends on the kind of fruit. Furthermore, I'd like to batch up the fruit into "boxes", each containing just one kind of fruit, so that I only process a box at a time. Without TBB I'd write a thread that read in the fruit one at a time, sorted them into buckets based on their type, and parceled them up into boxes.

Subscribe to Intel® Threading Building Blocks