Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_data
Commits
9498e79d
Commit
9498e79d
authored
Jun 30, 2017
by
incardon
Browse files
Fixing SE_CLASS1 check
parent
c74b7258
Changes
1
Show whitespace changes
Inline
Side-by-side
src/Grid/grid_base_implementation.hpp
View file @
9498e79d
...
...
@@ -94,6 +94,20 @@ private:
}
}
/*! \brief Check that the key is inside the grid
*
* \param key
*
*/
inline
void
check_bound
(
size_t
v1
)
const
{
if
(
v1
>=
getGrid
().
size
())
{
std
::
cerr
<<
"Error "
__FILE__
<<
":"
<<
__LINE__
<<
" grid overflow "
<<
v1
<<
" >= "
<<
getGrid
().
size
()
<<
"
\n
"
;
ACTION_ON_ERROR
(
GRID_ERROR_OBJECT
);
}
}
/*! \brief Check that the key is inside the grid
*
* check if key2 is inside the g grid boundary
...
...
@@ -453,7 +467,8 @@ public:
* \return the reference of the element
*
*/
template
<
unsigned
int
p
,
typename
r_type
=
decltype
(
mem_get
<
p
,
layout_base
<
T
>,
layout
,
grid_sm
<
dim
,
T
>
,
grid_key_dx
<
dim
>>::
get_lin
(
data_
,
g1
,
0
))
>
inline
r_type
get
(
const
size_t
lin_id
)
template
<
unsigned
int
p
,
typename
r_type
=
decltype
(
mem_get
<
p
,
layout_base
<
T
>,
layout
,
grid_sm
<
dim
,
T
>
,
grid_key_dx
<
dim
>>::
get_lin
(
data_
,
g1
,
0
))
>
inline
r_type
get
(
const
size_t
lin_id
)
{
#ifdef SE_CLASS2
check_valid
(
this
,
8
);
...
...
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