Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
0c9906bd
Commit
0c9906bd
authored
6 years ago
by
Sam Yates
Committed by
Benjamin Cumming
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove NDEBUG tests in memory utils. (#523)
Fixes #182.
parent
3ee79191
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arbor/memory/array_view.hpp
+0
-18
0 additions, 18 deletions
arbor/memory/array_view.hpp
arbor/memory/copy.hpp
+0
-2
0 additions, 2 deletions
arbor/memory/copy.hpp
with
0 additions
and
20 deletions
arbor/memory/array_view.hpp
+
0
−
18
View file @
0c9906bd
...
...
@@ -180,31 +180,23 @@ public:
/// access half open sub-range using two indexes [left, right)
view_type
operator
()(
size_type
left
,
size_type
right
)
{
#ifndef NDEBUG
arb_assert
(
right
<=
size_
&&
left
<=
right
);
#endif
return
view_type
(
pointer_
+
left
,
right
-
left
);
}
const_view_type
operator
()(
size_type
left
,
size_type
right
)
const
{
#ifndef NDEBUG
arb_assert
(
right
<=
size_
&&
left
<=
right
);
#endif
return
view_type
(
pointer_
+
left
,
right
-
left
);
}
/// access half open sub-range using one index and one-past-the-end [left, end)
view_type
operator
()(
size_type
left
,
end_type
)
{
#ifndef NDEBUG
arb_assert
(
left
<=
size_
);
#endif
return
view_type
(
pointer_
+
left
,
size_
-
left
);
}
const_view_type
operator
()(
size_type
left
,
end_type
)
const
{
#ifndef NDEBUG
arb_assert
(
left
<=
size_
);
#endif
return
view_type
(
pointer_
+
left
,
size_
-
left
);
}
...
...
@@ -260,16 +252,12 @@ public:
// per element accessors
// return a reference type provided by Coordinator
reference
operator
[]
(
size_type
i
)
{
#ifndef NDEBUG
arb_assert
(
i
<
size_
);
#endif
return
coordinator_
.
make_reference
(
pointer_
+
i
);
}
const_reference
operator
[]
(
size_type
i
)
const
{
#ifndef NDEBUG
arb_assert
(
i
<
size_
);
#endif
return
coordinator_
.
make_reference
(
pointer_
+
i
);
}
...
...
@@ -385,17 +373,13 @@ public:
/// access half open sub-range using two indexes [left, right)
const_view_type
operator
()(
size_type
left
,
size_type
right
)
const
{
#ifndef NDEBUG
arb_assert
(
right
<=
size_
&&
left
<=
right
);
#endif
return
const_view_type
(
pointer_
+
left
,
right
-
left
);
}
/// access half open sub-range using one index and one-past-the-end [left, end)
const_view_type
operator
()(
size_type
left
,
end_type
)
const
{
#ifndef NDEBUG
arb_assert
(
left
<=
size_
);
#endif
return
const_view_type
(
pointer_
+
left
,
size_
-
left
);
}
...
...
@@ -439,9 +423,7 @@ public:
// per element accessors
// return a reference type provided by Coordinator
const_reference
operator
[]
(
size_type
i
)
const
{
#ifndef NDEBUG
arb_assert
(
i
<
size_
);
#endif
return
coordinator_
.
make_reference
(
pointer_
+
i
);
}
...
...
This diff is collapsed.
Click to expand it.
arbor/memory/copy.hpp
+
0
−
2
View file @
0c9906bd
...
...
@@ -11,9 +11,7 @@ namespace memory {
template
<
typename
LHS
,
typename
RHS
>
void
copy
(
LHS
&&
from
,
RHS
&&
to
)
{
#ifndef NDEBUG
arb_assert
(
from
.
size
()
==
to
.
size
());
#endif
#ifdef VERBOSE
std
::
cerr
<<
util
::
blue
(
"copy"
)
<<
" "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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