Search found 12 matches

by Spreis
Tue Feb 14, 2017 11:34 am
Forum: TR4 OpenMP 5.0 Preview Discussion
Topic: If clause for SIMD construct
Replies: 0
Views: 16886

If clause for SIMD construct

This was suggested couple of times already, but maybe OpenMP 5.0 will make it happen. Rationale: SIMD execution is not always profitable (think short trip counts) or even allowed (think overlapped memory accesses). It seems reasonable and desirable to have 'if' clause applicable to simd construct to...
by Spreis
Sun Nov 08, 2015 9:03 pm
Forum: Using OpenMP
Topic: SIMD construct question
Replies: 4
Views: 8136

Re: SIMD construct question

The performance of reductions depend on trip count: the reduce operation is executed after the loop and may be slower than series of scalar additions (depending on platform). So you need quite some iterations to amortize reduce cost. Overall with large enough 'n' the code should perform reasonably g...
by Spreis
Mon Aug 31, 2015 3:00 am
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: Adding an 'if' clause to the 'simd' construct
Replies: 1
Views: 18986

Re: Adding an 'if' clause to the 'simd' construct

Probably having general 'if' clause (with dynamic condition known before entering the construct) makes sense for simd construct same way as for parallel construct. This general 'if' might subsume compile-time-only use case: compilers might optimize away one of the branches if condition is known at c...
by Spreis
Sun Aug 09, 2015 11:56 pm
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: simdlen considered harmful
Replies: 1
Views: 19134

Re: simdlen considered harmful

There are 2 uses for simdlen IMO: 1. To match #pragma omp declare simd. The simdlen for the latter is well-defined and if one need would like to strictly ensure match caller to callee by simdlen() he/she should have ability to do so. 2. If loop operates on multiple types one may decide what is bette...
by Spreis
Thu Aug 06, 2015 10:54 am
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: linear(ref) seems impossible to express in C++
Replies: 6
Views: 25035

Re: linear(ref) seems impossible to express in C++

Exactly: linear(ref) is really useful extension for #omp declare simd. In this case specification applies to parameters/dummy arguments which are already represent chunk of values and means that address passed is linearly increasing (data occupies consecutive memory) which is good because all the va...
by Spreis
Wed Aug 05, 2015 10:00 pm
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: linear(ref) seems impossible to express in C++
Replies: 6
Views: 25035

Re: linear(ref) seems impossible to express in C++

I don't think so. Wording is precise and explicit about C++ and Fortran. For C++ pointers and references are generally allowed, but only references allowed with ref/uval modifiers. 8 A list-item that appears in a linear clause without the ref modifier must be of integral or 9 pointer type, or must b...
by Spreis
Wed Aug 05, 2015 4:13 am
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: linear(ref) seems impossible to express in C++
Replies: 6
Views: 25035

Re: linear(ref) seems impossible to express in C++

I have to agree that linear(ref:V) seems to be focused on C array pointer arithmetic in a loop. The wording is not precise. It seems that #pragma omp simd linear(ref:V) for(i=0;i<n;++i){ A[i]=*V; ++V; } is going to replace *V with *(V ) [applying the ... as a subscript to the original list item]. T...
by Spreis
Mon Aug 03, 2015 10:40 am
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: reduction with array section, lower bound 0
Replies: 1
Views: 18388

Re: reduction with array section, lower bound 0

0 for lower bound of a section is strange requirement overall: it precludes reductions into single array elements and distribution of reduction array among threads by non-overlapping sections for SIMD processing. Something like code below: #pragma omp parallel for shared(array) schedule(static, chun...
by Spreis
Fri Jul 31, 2015 12:05 am
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: omp declare simd linear(uval)/linear(ref)
Replies: 0
Views: 4495

omp declare simd linear(uval)/linear(ref)

omp declare simd construct description (2.8.2) describes linear clause only via cross-reference to general specification of a linear clause (2.15.3.7). 19 * linear clause, see Section 2.15.3.7 on page 204 25 The linear clause declares one or more list items to be private to a SIMD lane and to have ...
by Spreis
Thu Jul 30, 2015 5:20 am
Forum: OpenMP 4.1 DRAFT - Public Comments
Topic: linear(ref) seems impossible to express in C++
Replies: 6
Views: 25035

linear(ref) seems impossible to express in C++

The definition of linear(ref) is following: 15 If the ref modifier is used, the value of the new list item on each iteration of the 16 associated loop(s) corresponds to the value of the variable resulting from applying the linear-step 17 times the logical number of the iteration as a subscript to th...