Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
FortyMcFortface
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Mey
FortyMcFortface
Commits
5de97173
Commit
5de97173
authored
8 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
build everything by default
parent
369154ed
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Parser/Makefile
+1
-1
1 addition, 1 deletion
Parser/Makefile
Parser/test-data/OpenAcc/grep.f
+0
-193
0 additions, 193 deletions
Parser/test-data/OpenAcc/grep.f
Parser/test-data/OpenAcc/rewrites.f
+265
-0
265 additions, 0 deletions
Parser/test-data/OpenAcc/rewrites.f
with
266 additions
and
194 deletions
Parser/Makefile
+
1
−
1
View file @
5de97173
all
:
jastadd
all
:
rats
jastadd
ast
:
mkdir
-p
spec-gen
...
...
This diff is collapsed.
Click to expand it.
Parser/test-data/OpenAcc/grep.f
deleted
100644 → 0
+
0
−
193
View file @
369154ed
!$acc data copy(T,r,f,x) copyin(stiffness_mat,mass_mat_diag,global_mass_inv)
!$acc update host(T)
!$acc parallel loop private(k,i) collapse(2) async(1) gang vector vector_length(16)
do
k
=
1
,
num_ele
end
do
!$acc end parallel loop
!$acc parallel loop private(k,i) collapse(2) async(1) gang vector vector_length(16)
do
k
=
1
,
num_ele
end
do
!$acc end parallel loop
!$acc parallel loop async(1) gang
do
k
=
2
,
num_ele
end
do
!$acc end parallel loop
!$acc wait
!$acc update host(f(0:0,1),f(po:po,num_ele))
!$acc update device(f(0:0,1),f(po:po,num_ele))
!$acc parallel loop async(1) collapse(2) private(k,i) gang vector vector_length(16)
do
k
=
1
,
num_ele
end
do
!$acc end parallel loop
!$acc parallel loop async(1) collapse(2) private(k,i) gang vector vector_length(16)
do
k
=
1
,
num_ele
end
do
!$acc end parallel loop
!$acc wait
!$acc update host(T)
!$acc end data
!$acc data copy (T) create(f,r)
!$acc update host(T)
!$acc data present(T,r,f,stiffness_mat,global_mass_inv,mass_mat_diag)
!$acc parallel loop private(k,i) async(1) gang worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector
do
i
=
0
,
po
end
do
end
do
!$acc end parallel loop
!$acc parallel loop private(k,i) async(1) gang, worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector private(j,sum)
do
i
=
0
,
po
end
do
end
do
!$acc loop reduction(+:sum)
do
j
=
0
,
po
end
do
!$acc end loop
end
do
!$acc end parallel loop
!$acc wait(1)
!$acc update host(f(0:0,1),f(po:po,num_ele)) async(2)
!$acc parallel loop private(k) async(1) gang
do
k
=
2
,
num_ele
end
do
!$acc end parallel loop
!$omp end do
!$acc wait(2)
!$acc update device(f(0:0,1),f(po:po,num_ele)) async(2)
!$acc wait(1,2)
!$omp end single
!$acc parallel loop async(1) private(k,i) gang worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector
do
i
=
0
,
po
end
do
!$acc end parallel loop
!$acc parallel loop async(1) private(k,i) gang worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector
do
i
=
0
,
po
end
do
!$acc end parallel loop
end
do
!$acc wait(1)
!$acc update host(T(:,:,0))
!$acc end data
!$acc end data
!$acc data present(T,r,f,stiffness_mat,global_mass_inv,mass_mat_diag)
!$acc parallel loop private(k,i,j,sum) async(1) gang worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector
do
i
=
0
,
po
end
do
!$acc end parallel loop
!$acc parallel loop private(k,i) async(1) gang
do
k
=
2
,
num_ele
end
do
!$acc end parallel loop
!$acc wait
!$acc update host(f(0:0,1),f(po:po,num_ele))
!$acc update device(f(0:0,1),f(po:po,num_ele))
!$omp end single
!$acc parallel loop async(1) private(k,i) gang worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector
do
i
=
0
,
po
!$acc end parallel
!$omp end do
!$acc parallel loop async(1) private(k,i) gang worker vector_length(16)
do
k
=
1
,
num_ele
!$acc loop vector
do
i
=
0
,
po
end
do
!$acc end parallel loop
!$acc wait
!$acc end data
end
This diff is collapsed.
Click to expand it.
Parser/test-data/OpenAcc/rewrites.f
0 → 100644
+
265
−
0
View file @
5de97173
! OpenACC clause test
x
=
0
! if ===========================================================================
!$acc parallel if(1)
x
=
1
!$acc end parallel
!$acc parallel if(a)
x
=
1
!$acc end parallel
!$acc parallel if(a + 1)
x
=
1
!$acc end parallel
!$acc parallel if(a%b)
x
=
1
!$acc end parallel
!$acc parallel if(a(1,2))
x
=
1
!$acc end parallel
! default(none) ================================================================
!$acc parallel default(none)
x
=
1
!$acc end parallel
! device type ==================================================================
!$acc parallel device_type(t1)
x
=
1
!$acc end parallel
!$acc parallel device_type(t1,t2)
x
=
1
!$acc end parallel
!$acc parallel device_type(*)
x
=
1
!$acc end parallel
! short versions are expanded
! !$acc parallel dtype(t1)
! x = 1
! !$acc end parallel
! !$acc parallel dtype(t1,t2)
! x = 1
! !$acc end parallel
! !$acc parallel dtype(*)
! x = 1
! !$acc end parallel
! tile =========================================================================
!$acc loop tile(myTile)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
! wait =========================================================================
!$acc parallel wait(x + 1,2,y)
x
=
1
!$acc end parallel
! collapse =====================================================================
!$acc loop collapse(4)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop collapse(0)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop collapse(#TEST#)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
! expression clauses ===========================================================
!$acc parallel async(1 + x)
x
=
1
!$acc end parallel
!$acc parallel num_gangs(1 + x)
x
=
1
!$acc end parallel
!$acc parallel num_workers(1 + x)
x
=
1
!$acc end parallel
!$acc parallel vector_length(1 + x)
x
=
1
!$acc end parallel
! reduction ====================================================================
! operators
!$acc parallel reduction(+:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(*:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(max:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(min:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(iand:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(ior:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(ieor:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(.and.:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(.or.:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(.eqv.:x)
x
=
1
!$acc end parallel
!$acc parallel reduction(.neqv.:x)
x
=
1
!$acc end parallel
! variabes
!$acc parallel reduction(+:x,y,z)
x
=
1
!$acc end parallel
! variable list clauses ========================================================
!$acc enter data copy(x,y,z)
!$acc enter data copyin(x,y)
!$acc enter data copyout(x)
!$acc enter data create(x)
!$acc enter data delete(x)
!$acc enter data device(x)
!$acc enter data firstprivate(x)
!$acc enter data host(x)
!$acc enter data present(x)
!$acc enter data present_or_copy(x)
!$acc enter data present_or_copyin(x)
!$acc enter data present_or_copyout(x)
!$acc enter data present_or_create(x)
!$acc enter data private(x)
!$acc enter data self(x)
!$acc enter data use_device(x)
! short versions are expanded
! !$acc enter data pcopy(x)
! !$acc enter data pcopyin(x)
! !$acc enter data pcopyout(x)
! !$acc enter data pcreate(x)
! loop clauses =================================================================
!$acc loop gang
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop worker
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop vector
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop independent
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop gang(3)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop worker(3)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop vector(3)
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
!$acc loop shortloop
do
i
=
1
,
n
(
5
)
x
=
1
end
do
!$acc end loop
! seq ==========================================================================
!$acc routine(myRoutine) seq
! bind =========================================================================
!$acc routine(myRoutine) bind(aName)
!$acc routine(myRoutine) bind('some string...! x = 1')
! nohost =======================================================================
!$acc routine nohost
! device_resident ==============================================================
!$acc declare device_resident(x,y,z)
! link =========================================================================
!$acc declare link(x,y,z)
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment