Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
multiscale
lammps
Commits
7cff3436
Commit
7cff3436
authored
8 years ago
by
Dan Ibanez
Browse files
Options
Downloads
Patches
Plain Diff
fix allocation regressions in PairTableKokkos
parent
a1ac8610
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/KOKKOS/pair_table_kokkos.cpp
+10
-1
10 additions, 1 deletion
src/KOKKOS/pair_table_kokkos.cpp
src/KOKKOS/pair_table_kokkos.h
+0
-9
0 additions, 9 deletions
src/KOKKOS/pair_table_kokkos.h
with
10 additions
and
10 deletions
src/KOKKOS/pair_table_kokkos.cpp
+
10
−
1
View file @
7cff3436
...
...
@@ -54,6 +54,7 @@ PairTableKokkos<DeviceType>::~PairTableKokkos()
{
delete
h_table
;
delete
d_table
;
copymode
=
true
;
//prevents base class destructor from running
}
/* ---------------------------------------------------------------------- */
...
...
@@ -345,10 +346,18 @@ void PairTableKokkos<DeviceType>::create_kokkos_tables()
template
<
class
DeviceType
>
void
PairTableKokkos
<
DeviceType
>::
allocate
()
{
PairTable
::
allocate
();
allocated
=
1
;
const
int
nt
=
atom
->
ntypes
+
1
;
memory
->
create
(
setflag
,
nt
,
nt
,
"pair:setflag"
);
memory
->
create_kokkos
(
d_table
->
cutsq
,
h_table
->
cutsq
,
cutsq
,
nt
,
nt
,
"pair:cutsq"
);
memory
->
create_kokkos
(
d_table
->
tabindex
,
h_table
->
tabindex
,
tabindex
,
nt
,
nt
,
"pair:tabindex"
);
d_table_const
.
cutsq
=
d_table
->
cutsq
;
d_table_const
.
tabindex
=
d_table
->
tabindex
;
memset
(
&
setflag
[
0
][
0
],
0
,
nt
*
nt
*
sizeof
(
int
));
memset
(
&
cutsq
[
0
][
0
],
0
,
nt
*
nt
*
sizeof
(
double
));
memset
(
&
tabindex
[
0
][
0
],
0
,
nt
*
nt
*
sizeof
(
int
));
}
/* ----------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
src/KOKKOS/pair_table_kokkos.h
+
0
−
9
View file @
7cff3436
...
...
@@ -93,15 +93,6 @@ class PairTableKokkos : public PairTable {
typename
ArrayTypes
<
LMPHostType
>::
t_ffloat_2d
rsq
,
drsq
,
e
,
de
,
f
,
df
,
e2
,
f2
;
};
struct
Table
{
int
ninput
,
rflag
,
fpflag
,
match
,
ntablebits
;
int
nshiftbits
,
nmask
;
double
rlo
,
rhi
,
fplo
,
fphi
,
cut
;
double
*
rfile
,
*
efile
,
*
ffile
;
double
*
e2file
,
*
f2file
;
double
innersq
,
delta
,
invdelta
,
deltasq6
;
double
*
rsq
,
*
drsq
,
*
e
,
*
de
,
*
f
,
*
df
,
*
e2
,
*
f2
;
};
TableDeviceConst
d_table_const
;
TableDevice
*
d_table
;
TableHost
*
h_table
;
...
...
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