Intel® Array Building Blocks (Archived)

pack() seems relatively expensive

Compared to

pack( source, mask )

... I get better timings for

split( source, select( mask, isize(1), isize(0) )).segment( usize(1) )

... i.e. it is faster to sort "in place" and keep onlythat whichyou need. And much faster if you want both parts!For example

t1 = pack( source, mask );
t2 = pack( source, !mask);

... versus

t0 = split( source, select( mask, isize(1), isize(0) ));
t1 = t0.segment( usize(1) );
t2 = t0.segment( usize(0) );

Just FYI,
- paul

the "this" pointer

In msg #5 of "select() for references" thread, we've reiterated the "baked in" aspect of ArBB compilation and C++ pointers.

How does this work for the this pointer? How do we write class member functions e.g. to take advantage of compiling ArBB closures and saving these as class static and/or function static objects to be called later?

select() for references

That handy function select() would have more utility if it successfully passed along container references e.g:

void foo(f32& Out, const f32& In1, const f32&In2) { ... }

dense a1, a2, b1,b2; // some data

map(foo)( select(cond, a1, a2), b1, b2 );

Compiles OK, but the JIT seems to decide neither a1 nor a2 is a map output so this code gets optimized away...

- paul

OUT_OF_MEM: ArBB Heap out of usage [ArBB AMM Runtime Error]

Hello!

I implemented a program (for benchmarking purpose) using ArBB. The
program computes multiplication of sparse square matrix by dense vector.

Standard 3-arrays zero-based CRS format for matrix representation is used, that's why I defined such structure:

struct crsMatrixArBB
{
// non-zero values (NZnum - its size)
dense Value;
// indeces of columns (NZnum - size)
dense Col;
// indeces of rows (N + 1 - size, N - number of rows in matrix)
dense RowIndex;
};

add_merge()

What is the utility,the purpose,of add_merge()? I understand what it does, but not why it exists. It's not anything like scatter() ... an "add scatter" would make more sense, to me.
- paul

Iscriversi a Intel® Array Building Blocks (Archived)