Intel® Array Building Blocks (Archived)

Unexpected slowing

Having fun with section() and replace(), but have stumbled on unexpected slowing. The ArBB function, simplified below (to protect the guilty, but still exhibits the behavior), is like a red-black Jacobi relaxation iteration. Alternatenon-overlapping "halves" of the state vector "A" get updated.

runtime array size

Is it possible to set the size of an arbb::array at runtime?
int Dim = x*y;
array foo;

I just seem to get
test4.cpp:476:12: error: Dim cannot appear in a constant-expression

Also, this program just segfaults

# include

using namespace arbb;
typedef arbb::array UDT2;

int main() {

dense result(2);

}

Is this a heap (or maybe i mean stack) size issue ? Works OK (if very slowly) if you reduce by a factor 0f 10 . . .

map function arguments of dense<f32,2> & foo

Hi,
I am looking at the argument types that can be passed into a function to
be called by map. As far as I can see this

void testMapFn1(arbb::f32& t1, arbb::f32 t2, arbb::dense t3, arbb::dense & t4) {

arbb::usize col;
position(col);
t1 = t2 + t3(col,0);
t4(col,0) = t1;
}

doesn't break any of the rules, but when i try and call it like

void testMapFn1Call(arbb::dense & t1, arbb::dense t2,
arbb::dense t3, arbb::dense & t4) {

arbb::map(testMapFn1)(t1,t2,t3,t4);
}

User Defined Types

The documentation says that I can have user defined types as long as I follow a few basic rules
"

  • The type has a public default constructor, copy constructor,
    assignment operator and non-virtual destructor. All of these functions
    must be either implicitly declared or behave as if they were implicitly
    declared.
  • All non-static member variables of the types must be instances of
    Intel ArBB scalar types, container types, or other valid user-defined
    types.

to _range or not to _range . . .

I'm completely new to this arbb and have been looking at the tutorials and the online docs.
I had a basic question, in tutorial0 there are these lines

bind(vec_out, out, vec_length);
call(sum_kernel)(vec_a, vec_b, vec_out);
output_result(out);

and later

dense out_only;
call(sum_kernel)(vec_a, vec_b, out_only);
const arbb::const_range output = out_only.read_only_range();
float result[vec_length];
for (unsigned int i = 0; i < vec_length; ++i) {
result[i] = output[i];
}
output_result(result);

Compilation failure

In beta 3, the followingworks as expected:

dense tmp = add_reduce( nested::parse("{{1, 2}, {3, 4, 5}}") * nested::parse("{{1, 1}, {1, 1, 1}}") );

...but this fails:

void test(dense &out, nested &arg1, nested &arg2)
{
out = add_reduce(arg1 * arg2);
};

dense tmp;
call(test)(tmp, nested::parse("{{1, 2}, {3, 4, 5}}"), nested::parse("{{1, 1}, {1, 1, 1}}"));

Subscribe to Intel® Array Building Blocks (Archived)