Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LGPU FPP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fernando Pérez Panadero
LGPU FPP
Commits
40cc784d
Commit
40cc784d
authored
Oct 19, 2023
by
Fernando Pérez Panadero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfcf slightly modified
parent
3bd8f080
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
src/LatticeGPU.jl
src/LatticeGPU.jl
+1
-1
src/Solvers/Solvers.jl
src/Solvers/Solvers.jl
+1
-1
src/Solvers/sfcf.jl
src/Solvers/sfcf.jl
+11
-13
No files found.
src/LatticeGPU.jl
View file @
40cc784d
...
@@ -64,6 +64,6 @@ include("Solvers/Solvers.jl")
...
@@ -64,6 +64,6 @@ include("Solvers/Solvers.jl")
using
.
Solvers
using
.
Solvers
export
CG!
export
CG!
export
propagator
,
bndpropagator
export
propagator
,
bndpropagator
export
fP
!
,
fA!
,
kV!
,
lV!
export
fP
,
fA
,
kV
,
lV
end
# module
end
# module
src/Solvers/Solvers.jl
View file @
40cc784d
...
@@ -26,7 +26,7 @@ include("Propagators.jl")
...
@@ -26,7 +26,7 @@ include("Propagators.jl")
export
propagator
,
bndpropagator
export
propagator
,
bndpropagator
include
(
"sfcf.jl"
)
include
(
"sfcf.jl"
)
export
fP
!
,
fA!
,
kV!
,
lV!
export
fP
,
fA
,
kV
,
lV
end
end
src/Solvers/sfcf.jl
View file @
40cc784d
function
fP
!
(
fp
,
dws
::
DiracWorkspace
,
prop
::
AbstractArray
,
lp
::
SpaceParm
)
function
fP
(
prop
::
AbstractArray
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
)
function
krnl_fP
!
(
sum
,
pro
)
function
krnl_fP
!
(
sum
,
pro
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
...
@@ -16,12 +16,10 @@ function fP!(fp, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
...
@@ -16,12 +16,10 @@ function fP!(fp, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_fP!
(
dws
.
cs
,
prop
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_fP!
(
dws
.
cs
,
prop
)
end
end
fp
+=
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
return
nothing
end
end
function
fA
!
(
fa
,
dws
::
DiracWorkspace
,
prop
::
AbstractArray
,
lp
::
SpaceParm
)
function
fA
(
prop
::
AbstractArray
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
)
function
krnl_fA
!
(
sum
,
pro
)
function
krnl_fA
!
(
sum
,
pro
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
...
@@ -35,11 +33,11 @@ function fA!(fa, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
...
@@ -35,11 +33,11 @@ function fA!(fa, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
CUDA
.
@sync
begin
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_fA!
(
dws
.
cs
,
prop
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_fA!
(
dws
.
cs
,
prop
)
end
end
fa
+=
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
return
nothing
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
end
end
function
kV
!
(
kv
,
dws
::
DiracWorkspace
,
prop
::
AbstractArray
,
lp
::
SpaceParm
)
function
kV
(
prop
::
AbstractArray
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
)
function
krnl_kV
!
(
sum
,
pro
)
function
krnl_kV
!
(
sum
,
pro
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
...
@@ -53,11 +51,11 @@ function kV!(kv, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
...
@@ -53,11 +51,11 @@ function kV!(kv, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
CUDA
.
@sync
begin
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_kV!
(
dws
.
cs
,
prop
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_kV!
(
dws
.
cs
,
prop
)
end
end
kv
+=
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
return
nothing
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
end
end
function
lV
!
(
lv
,
dws
::
DiracWorkspace
,
prop
::
AbstractArray
,
lp
::
SpaceParm
)
function
lV
(
prop
::
AbstractArray
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
)
function
krnl_lV
!
(
sum
,
pro
)
function
krnl_lV
!
(
sum
,
pro
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
...
@@ -73,6 +71,6 @@ function lV!(lv, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
...
@@ -73,6 +71,6 @@ function lV!(lv, dws::DiracWorkspace, prop::AbstractArray,lp::SpaceParm)
CUDA
.
@sync
begin
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_lV!
(
dws
.
cs
,
prop
)
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_lV!
(
dws
.
cs
,
prop
)
end
end
lv
+=
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
return
nothing
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment