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
e16780b6
Commit
e16780b6
authored
Oct 19, 2023
by
Fernando Pérez Panadero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed functions kV and kT
parent
3d913155
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
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
+5
-7
No files found.
src/LatticeGPU.jl
View file @
e16780b6
...
...
@@ -64,6 +64,6 @@ include("Solvers/Solvers.jl")
using
.
Solvers
export
CG!
export
propagator
,
bndpropagator
,
Tbndpropagator
export
fP
,
fA
,
kV
,
lV
export
fP
,
fA
,
kV
,
kT
end
# module
src/Solvers/Solvers.jl
View file @
e16780b6
...
...
@@ -26,7 +26,7 @@ include("Propagators.jl")
export
propagator
,
bndpropagator
,
Tbndpropagator
include
(
"sfcf.jl"
)
export
fP
,
fA
,
kV
,
lV
export
fP
,
fA
,
kV
,
kT
end
src/Solvers/sfcf.jl
View file @
e16780b6
...
...
@@ -44,7 +44,7 @@ function kV(prop::AbstractArray,dws::DiracWorkspace, lp::SpaceParm)
r
=
Int64
(
CUDA
.
blockIdx
()
.
x
)
I
=
point_coord
((
b
,
r
),
lp
)
sum
[
I
]
=
-
(
norm2
(
dmul
(
Gamma
{
6
},
pro
[
b
,
r
]))
+
norm2
(
dmul
(
Gamma
{
7
},
pro
[
b
,
r
]))
+
norm2
(
dmul
(
Gamma
{
8
},
pro
[
b
,
r
])
))
/
6
sum
[
I
]
=
-
norm2
(
dmul
(
Gamma
{
6
},
pro
[
b
,
r
])
+
dmul
(
Gamma
{
7
},
pro
[
b
,
r
])
+
dmul
(
Gamma
{
8
},
pro
[
b
,
r
]
))
/
6
return
nothing
end
...
...
@@ -55,21 +55,19 @@ function kV(prop::AbstractArray,dws::DiracWorkspace, lp::SpaceParm)
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
end
function
lV
(
prop
::
AbstractArray
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
)
function
kT
(
prop
::
AbstractArray
,
dws
::
DiracWorkspace
,
lp
::
SpaceParm
)
function
krnl_
lV
!
(
sum
,
pro
)
function
krnl_
kT
!
(
sum
,
pro
)
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
r
=
Int64
(
CUDA
.
blockIdx
()
.
x
)
I
=
point_coord
((
b
,
r
),
lp
)
sum
[
I
]
=
im
*
(
dot
(
dmul
(
Gamma
{
6
},
pro
[
b
,
r
]),
dmul
(
Gamma
{
5
},
dmul
(
Gamma
{
10
},
pro
[
b
,
r
])))
+
dot
(
dmul
(
Gamma
{
7
},
pro
[
b
,
r
]),
dmul
(
Gamma
{
5
},
dmul
(
Gamma
{
11
},
pro
[
b
,
r
])))
+
dot
(
dmul
(
Gamma
{
8
},
pro
[
b
,
r
]),
dmul
(
Gamma
{
5
},
dmul
(
Gamma
{
12
},
pro
[
b
,
r
]))))
/
6
sum
[
I
]
=
-
im
*
dot
(
pro
[
b
,
r
],
dmul
(
Gamma
{
1
},
dmul
(
Gamma
{
10
},
pro
[
b
,
r
]))
+
dmul
(
Gamma
{
2
},
dmul
(
Gamma
{
11
},
pro
[
b
,
r
]))
+
dmul
(
Gamma
{
3
},
dmul
(
Gamma
{
12
},
pro
[
b
,
r
])))
/
6
return
nothing
end
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_
kT
!
(
dws
.
cs
,
prop
)
end
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
dws
.
cs
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
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