Search found 74 matches

by jakub
Mon May 06, 2013 3:21 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: #pragma omp declare simd
Replies: 3
Views: 16503

Re: #pragma omp declare simd

Also, regarding the syntax where #pragma omp declare simd comes before template, are the parameter names in the uniform/linear/aligned/reduction (for reduction see previous comment) clauses the only things that is parsed actually after processing the function declaration? I mean: char *a; short *b; ...
by jakub
Thu May 02, 2013 9:12 am
Forum: Using OpenMP
Topic: OMP parallel for causes segmentation fault.
Replies: 8
Views: 22693

Re: OMP parallel for causes segmentation fault.

Note that e.g. readdir isn't reentrant nor thread-safe, so you can't use it in a parallel region safely.
by jakub
Thu May 02, 2013 7:24 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: #pragma omp declare simd
Replies: 3
Views: 16503

Re: #pragma omp declare simd

For #pragma omp declare simd, the spec lists reduction as an allowed clause? What is it useful for? From what I understand, reductions on #pragma omp simd are supposed to be treated like any other private variables, except that immediately before the loop they are constructed resp. initialized from ...
by jakub
Tue Apr 30, 2013 7:56 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: Nesting restriction
Replies: 1
Views: 10039

Re: Nesting restriction

Similarly, in #pragma omp declare simd description (2.8.2) the restrictions say that the execution of the body can't result in execution of an OpenMP construct. Does this preclude #pragma omp declare simd int foo (int x, int y) { #pragma omp declare simd extern int bar (int x, int y); return x + bar...
by jakub
Tue Apr 30, 2013 4:50 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: Nesting restriction
Replies: 1
Views: 10039

Nesting restriction

2.16 disallows any OpenMP constructs in simd region. For most of the constructs it is logical, but I wonder if/why that includes also the #pragma omp declare simd construct. While it is a construct, not a directive, it doesn't result in any code generated at that point, and especially in #pragma omp...
by jakub
Tue Apr 30, 2013 3:26 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: #pragma omp declare reduction
Replies: 2
Views: 16528

Re: #pragma omp declare reduction

What is the reason for allowing also operator-function-id as the operator name for C++? I mean,+, -, *, &, |, ^, && and || are allowed too, and the reduction clause only allows identifier (which matches identifier in declare reduction) and the earlier mentioned binary operators. By allowing both the...
by jakub
Thu Apr 25, 2013 9:30 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: linear clause issues
Replies: 8
Views: 27782

Re: linear clause issues

In the linear clause description the step doesn't have to be an integral constant expression, can be any integral expression, which is just fine in #pragma omp {,for,parallel for} simd, but for #pragma omp declare simd I wonder if it shouldn't be integral constant expression.
by jakub
Thu Apr 25, 2013 6:55 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: #pragma omp parallel for simd and *private* clauses
Replies: 0
Views: 11444

#pragma omp parallel for simd and *private* clauses

2.10 has "Some combined constructs have clauses that are permitted on both constructs that were combined. If applying the clause to one construct would result in different program behavior than applying the clause to the other construct then the program’s behavior is unspecified." Does this apply al...
by jakub
Thu Apr 25, 2013 3:57 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: linear clause issues
Replies: 8
Views: 27782

Re: linear clause issues

J, N, O are not linear w.r.t to I-loop, J, N, O are private w.r.t to I-loop. The collapse(4) clause says that all the 4 loops are collapsed together, into one loop that iterates 13*13*13*(13/2) times on this testcase, so there is no I loop and other loops. So, either the standard should forbid the ...
by jakub
Fri Apr 19, 2013 4:22 am
Forum: OpenMP 4.0 Public Review Release Candidates
Topic: linear clause issues
Replies: 8
Views: 27782

Re: linear clause issues

Thanks. Another issue I came up on today. If loop iteration vars are predetermined linear, they should have linear semantics, but in collapsed loops with collapse 2 and above they certainly don't have such semantics. extern int a[13][13][13][13], k, l, m; void foo (float *p) { int i, j, n, o; #pragm...