Questions tagged as 'openmp'

1
answer

Parallelizing n queens problem with OpenMP

I'm having trouble paralleling my C code with OpenMP and getting good performance on the n queens problem. The results are always considerably slower with parallelization enabled and I do not know why. The code is this below: #includ...
asked by 02.03.2018 / 20:01
1
answer

How to use OpenMP Lock Routines?

I need to create 5 easy-to-understand algorithms for each of the locking functions below in C or C ++ to be able to exemplify the operation of each and present to the staff in my room. omp_init_lock_with_hint omp_init_nest_lock_with_hint...
asked by 14.05.2017 / 19:36
0
answers

Parallelization of BubbleSort Open-MP C ++

I'm trying to paralyze the bubblesort algorithm using Open-MP and C ++, and the parallelization strategy is the pipe. The following code, to me, makes sense, but does not work, and only sorts the sub-vectors (Input Size) / (N) with N being the n...
asked by 09.04.2017 / 23:10
3
answers

How to loop openMp to count rows in a text file?

How to loop through the OpenMP library to count the rows one file? #pragma omp parallel for for (string line; getline(file, line); ) { count++; } In this way it does not execute, it seems that it only accepts for in normal...
asked by 11.02.2014 / 17:14
1
answer

How to perform the parallelization of this code snippet using OpenMp

I'm trying to parallelize an activity using OpenMp . I have problems because after the first one of the code below the result is wrong. #include <stdio.h> #include <fstream> #include <sstream> #include <omp.h> #in...
asked by 17.02.2014 / 17:12
1
answer

How to parallelize (OpenMP) a method call?

So, I am developing a work to do the comparison of a sequential and parallel execution of a Pattern Matching method. My input is a .txt of dozens of lines, which I go through and store inside a buffer: ... fread(buffer, sizeof(char), numero_by...
asked by 15.10.2018 / 22:12