openmp « thread « C Q&A

Home
C Q&A
1.assembly
2.buffer
3.Card
4.Cast
5.compile
6.console
7.const
8.constructor
9.database
10.Date
11.Debug
12.Design
13.Development
14.DLL
15.encrypt
16.enum
17.eof
18.Event
19.fork
20.Format
21.gcc
22.gdb
23.graph
24.graphics
25.gui
26.Holiday Event
27.image
28.IP
29.iterator
30.macro
31.makefile
32.malloc
33.Menu
34.mysql
35.network
36.openssl
37.operator
38.password
39.pipe
40.preprocessor
41.printf
42.pthread
43.Regular expression
44.scanf
45.semaphore
46.SerialPort
47.server
48.Socket
49.sql
50.SQLserver
51.sscanf
52.std
53.stdin
54.stdout
55.stl
56.strcmp
57.stream
58.switch
59.Template
60.thread
61.timer
62.unix
63.video
64.Virtual
65.visualstudio
66.winapi
67.windows
68.xml
C Q&A » thread » openmp 

1. Behavior of omp_get_max_threads in parallel regions    stackoverflow.com

I compile this bit of code on Snow Leopard and linux and I get different results. On Snow leopard, the first call of omp_get_max_threads returns 2, which is my number ...

2. Ordered Parallel code runs slower than single threading. Is there a solution?    stackoverflow.com

#pragma omp parallel for default(none) shared(x) private (y, z, f) ordered
for (i = 0; i < 512; i++) {
    #pragma omp ordered
    for (y = ...

3. Why is my OpenMP implementation slower than a single threaded implementation?    stackoverflow.com

I am learning about OpenMP concurrency, and tried my hand at some existing code I have. In this code, I tried to make all the for loops parallel. However, this seems ...

4. Why is my OpenMP implementation slower than a single threaded implementation? (Followup)    stackoverflow.com

This is a follow up to Why is my OpenMP implementation slower than a single threaded implementation? . I have adhered to the answer provided, and used tasking instead of for ...

5. #pragma omp flush to make exchange data among threads    stackoverflow.com

Hi writing a very simple example on how to use omp flush to exchange data, in a producer-> consumer way,among threads I have found a funny behavior.

int a=-1;
int flag=1;
int count=0;
#pragma omp ...

6. openMP with only one thread running?    stackoverflow.com

I have this code in the main:

int main(int argv, char **argc)
{
   // Get multi-CPU/multi-GPU data
   int num_gpus;
   cudaGetDeviceCount(&num_gpus);
   printf("### Number of host CPUs:\t%d\n", ...

7. How do I ask OpenMP to create threads only once at each run of the program?    stackoverflow.com

I am trying to parallelize a large program that is written by a third-party. I cannot disclose the code, but I will try and give the closest example of what I ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.