Intel® Cilk™ Plus

Vectorization of complex number operations using Cilk Plus (C++)

Hi, during optimization of my code I found that even simple C++ std::complex operations are not vectorized. See following code ///////////////////////////////////// #ifdef USE_CPP    #include    typedef std::complex cmplx16; #else    #include    typedef complex double cmplx16; #endif // USE_CPP #define simd_for _Pragma ("simd") for void sum(int Nx, int Ny, int Nz, cmplx16 A[Nx][Ny][Nz], cmplx16 B[Nx][Ny][Nz], cmplx16 C[Nx][Ny][Nz]) { __assume_aligned(A,32); __assume_aligned(B,32); __assume_aligned(C,32); for(int x=0; x   C[x][y][z] = A[x][y][z] + B[x][y][z];   } } } }

Compiling Cilk plus on Ubuntu 12.04 using gcc 4.7

Hi,

I am having trouble building Cilk plus (cilkplus-rtl-001857.tgz) on Ubuntu 12.04. The version of gcc and the error are below:

$ gcc --version
gcc (Ubuntu/Linaro 4.7.0-7ubuntu3) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Error:

Database connection pooling library using cilk plus

Hi,     I am querying the database for a like 10000 tables ( the database is quite big ) and as of now my code for querying the database is serial. To speed up the process I intend to openup multiple connections to the database and query database i.e. embed some parallelism in the cilk code for my project. I cannot think of a way to implement this in cilk plus    I thought of doing it in the following manner( but I don't know anything that would help me):

Two compiler crashes

The following tests cause compiler crashes, although they should be incorrect uses of _Cilk_spwan. (The spec seemly does not exclude the first test).

icc version 12.1.4 (gcc version 4.6.0 compatibility) (1) // a.cpp int foo(int i) {   return i; } int a = _Cilk_spawn foo(0); int main() {   return a; } Error message: (0): internal error: backend signals compilation aborted for a.cpp (code 4) (2)  // Found by my colleague Ben Langmuir // b.cpp int main() {   _Cilk_spawn 0;   return 0; } Error Message:

Problem with reducers and array notation (__sec_reduce_min)

Hi, I tried to create an example finding the minimum of values in an array using the __sec_reduce_min()-reducer. However, i got various error messages that i believe point out some bugs. I used the latest version of the cilk-branch (downloaded today, 21:00 EST) only with the flags -lcilkrts and -fcilkplus. I am running a Fedora 16 x86-64. 

using namespace std;

int main(int argc, char** argv) {
        double* A = new double[5]; 
        for (int i = 0; i < 5; i++) A[i] = i;
        __sec_reduce_min(A[0:5]);
        return 0;
        
}

Implicit cilk_sync before try-block does not seem to work

Hi, i wanted to implement an example from the Cilk Plus User Guide: Page 37, Exception Handling, where they show, how the implicit sync in front of a try-block could limit the parallelism of the program. My code is as follows:

void mysleep(int a) {

        sleep(a);

}
int main(int argc, char ** argv) {

        cilk_spawn mysleep(5);

        try {

                cilk_spawn mysleep(5);

                mysleep(5);

        }
        catch(int err) {

        }

}

wierd behaviour of cilk_for keyword

I am writting code in C90 and using cilkplus. I use a library which define TRY, CATCH macros to simulate the try catch behaviour similar to C++. Now the following piece of code compiles and runs as expected:

int j ;
for ( j=0; j<some_constant; ++j)
{
TRY {
//some code which throws exception
} CATCH(SQLException) {
//some action.
}
END_TRY;
}

but when the same code is run wth cilk_for keword, I get compile error
The code:

VS2010 installation problem

Hello,I have recently installed VS2010 and Intel Parallel Studio XE. I have been trying to use the ArrayNotation example from the Intel website.I am unable to resolve the following error: "ERROR: identifier __assume_aligned is undefined"I'm sure there is something basic I need to due, but I have been unable to sort it out.Additionally, the array notation in the code is showing up as red underline as if it isn't recognized syntax - How can I resolve this.Any help would be greatly apprciated, I have been pulling my hair out.Regards,Brad

writing a program with cilk

Hello all

I want to move from tests with cilk to an actual program .I would like from someone who has worked in a program with cilk just to explain the procedure( steps ) to follow in order to end up with a cilk program.

What i want to say is in what phase of my program should i import cilk.Should i finish it first as a serial program see that everything is working as expected or should import cilk before the serial program is ready.

页面

订阅 Intel® Cilk™ Plus