Questions tagged [cilk-plus]

Intel® Cilk™ Plus is an extension to C and C++ that improves the performance of programs on multicore processors.

Intel® Cilk™ Plus is an extension to C and C++ that improves the performance of programs on multicore processors. The three Intel Cilk Plus keywords provide a simple model for parallel programming, while runtime and template libraries offer an environment for building parallel applications.

Source: Intel Developer Zone

79 questions
1
vote
2 answers

Multithreaded algorithms work much slower

I have tried with OpenMP and Cilk Plus. The result is the same, multithreading works slower. I don't know what I'm doing wrong. I did what the guy did in this tutorial His code works better in parallel, while the situation in mine is like…
1
vote
1 answer

Cilk plus annotation using JetBrains Clion IDE (C++)

I need to use the cilk plus annotations in my C++ program, something like: #inlcude cilk_spawn myFunction(); cilk_sync; I'm using JetBrains CLion IDE and I'm getting the error Error after macro substitution: can't resolve type…
leqo
  • 356
  • 4
  • 15
1
vote
1 answer

G++ -cilkplus random behavior with std::vectors

The following (reduced) code is very badly handled by the series of GCC #include #include void walk(std::vector v, int bnd, unsigned size) { if (v.size() < size) for (int i=0; i
hivert
  • 10,579
  • 3
  • 31
  • 56
1
vote
0 answers

Efficient moving of values from vector of reducers to another vector [Cilk+]

How to perform efficient copying of values from a vector of reducers to another vector as follows? std::vector> v(10000000); //.... Code that populates the vector v ...// std::vector res(v.size(), 0); int i =…
letsBeePolite
  • 2,183
  • 1
  • 22
  • 37
1
vote
0 answers

CilkPlus: Vector of reducers that are not cache aligned

I am using Cilk and a custom reducer as described here: https://software.intel.com/en-us/node/522608. In their example, they use the reducer for append operation in a linked list. Now, I want to create a vector of reducers (using std::vector);…
John Elaine
  • 359
  • 5
  • 22
1
vote
1 answer

including of Cilk in Visual Studio 2015

How to include Cilk for parallel programming in Visual Studio 2015? Because there is default installation only for Visual Studio 2010.
tudomovv
  • 13
  • 5
1
vote
1 answer

How to organize a pool of non thread-safe resources in Cilk Plus (one resource per worker)?

I have a serial code that I would like to parallelize using Cilk Plus; the main loop calls a processing function repeatedly on different sets of data, so the iterations are independent of each other, except for the use of a non thread-safe resource,…
1
vote
1 answer

Cilk Plus in Ubuntu

I am trying to test the following code in Ubuntu 15.04. #include #include using namespace std; int main() { cilk_for(int x=0; x<10; x++) { cout << x << endl; } return 0; } I am getting the…
aghost
  • 235
  • 2
  • 12
1
vote
0 answers

Basic OpenMP Parallel Program Not Scaling As Expected

#include #include #include #include #include std::vector col_sums(const std::vector>& data) { unsigned int height = data.size(), width = data[0].size(); …
1
vote
2 answers

Parallelize function operating on a row of a 2D array (C, OpenMP, CilkPlus)

I am trying to parallelize the function calls within the for-loop inside main of test_function with OpenMP/CilkPlus (as shown in the C code). For each iteration, read/write operations occur on only one row of the 2d_array so there are no data…
koukouviou
  • 820
  • 13
  • 23
1
vote
1 answer

Cilk_for returns wrong data in array

I am new to multi threading programming. Recently, i have a project, which i apply cilk_for into it. Here is the code:. void myfunction(short *myarray) { m128i *array = (m128i*) myarray cilk_for(int i=0; i
Piel
  • 11
  • 2
1
vote
1 answer

How to link CUDA library with Cilk++

I am trying to develop some Hybrid program using Intel's Cilk++ and Nvidia's CUDA. I created a Shared library from Cuda code(libtest.so). And I want to link it with Cilk++ program, so that I can offload some work to GPU. But when I compile cilk++…
Ameya
  • 25
  • 3
1
vote
1 answer

Why is my for loop of cilk_spawn doing better than my cilk_for loop?

I have cilk_for (int i = 0; i < 100; i++) x = fib(35); the above takes 6.151 seconds and for (int i = 0; i < 100; i++) x = cilk_spawn fib(35); takes 5.703 seconds The fib(x) is the horrible recursive Fibonacci number function. If I dial…
d0m1n1c
  • 157
  • 4
  • 16
1
vote
2 answers

Trying to run cilkscreen/cilkview on gcc with cilkplus

I am currently trying to use cilkscreen to find a race condition in cilk; however, I have the following problem. cilkscreen ./executable -bash: /home/ubuntu/cilkutil/bin/cilkscreen: No such file or directory What am I doing wrong? I have downloaded…
jab
  • 5,673
  • 9
  • 53
  • 84
1
vote
1 answer

Does Intel array notation and elementary functions vectorize well with Xeon Phi ISA?

I try to find a proper material that clearly explains the different ways to write C/C++ source code that can be vectorized by the Intel compiler using array notation and elementary functions. All the materials online take trivial examples: saxpy,…
laszlo.endre
  • 290
  • 2
  • 14