Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Nektar
Nektar
Commits
2814b2e6
Commit
2814b2e6
authored
Jul 28, 2017
by
Dave Moxey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue with incorrect lambda capture
parent
0dcd57d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
library/LibUtilities/BasicUtils/ArrayPolicies.hpp
library/LibUtilities/BasicUtils/ArrayPolicies.hpp
+4
-5
library/LibUtilities/Memory/NekMemoryManager.hpp
library/LibUtilities/Memory/NekMemoryManager.hpp
+1
-1
No files found.
library/LibUtilities/BasicUtils/ArrayPolicies.hpp
View file @
2814b2e6
...
...
@@ -33,7 +33,6 @@
//
///////////////////////////////////////////////////////////////////////////////
#ifndef NEKTAR_LIB_UTILITIES_BASIC_UTILS_ARRAY_POLICIES_HPP
#define NEKTAR_LIB_UTILITIES_BASIC_UTILS_ARRAY_POLICIES_HPP
...
...
@@ -106,14 +105,14 @@ namespace Nektar
{
DoInitialization
(
data
,
itemsToCreate
,
[
&
initValue
](
ObjectType
*
element
)
{
new
(
element
)
ObjectType
(
initValue
);
});
[
&
](
ObjectType
*
element
)
{
new
(
element
)
ObjectType
(
initValue
);
});
}
static
void
Initialize
(
ObjectType
*
data
,
unsigned
int
itemsToCreate
,
const
ObjectType
*
initValue
)
{
DoInitialization
(
data
,
itemsToCreate
,
[
&
initValue
](
ObjectType
*
element
)
{
new
(
element
)
ObjectType
(
*
initValue
);
initValue
++
;
});
[
&
](
ObjectType
*
element
)
{
new
(
element
)
ObjectType
(
*
initValue
);
initValue
++
;
});
}
private:
...
...
@@ -170,7 +169,7 @@ namespace Nektar
}
}
};
template
<
typename
Dim
,
typename
DataType
,
typename
ExtentListType
>
std
::
shared_ptr
<
boost
::
multi_array_ref
<
DataType
,
Dim
::
Value
>
>
CreateStorage
(
const
ExtentListType
&
extent
)
...
...
@@ -180,7 +179,7 @@ namespace Nektar
std
::
multiplies
<
unsigned
int
>
());
DataType
*
storage
=
MemoryManager
<
DataType
>::
RawAllocate
(
size
);
return
MemoryManager
<
ArrayType
>::
AllocateSharedPtrD
(
[
storage
,
size
](
DataType
*
ptr
)
{
[
=
](
boost
::
multi_array_ref
<
DataType
,
Dim
::
Value
>
*
ptr
)
{
ArrayDestructionPolicy
<
DataType
>::
Destroy
(
storage
,
size
);
MemoryManager
<
DataType
>::
RawDeallocate
(
storage
,
size
);
},
...
...
library/LibUtilities/Memory/NekMemoryManager.hpp
View file @
2814b2e6
...
...
@@ -168,7 +168,7 @@ public:
{
DataType
*
data
=
Allocate
(
args
...);
return
std
::
shared_ptr
<
DataType
>
(
data
,
[
&
d
](
DataType
*
ptr
){
data
,
[
=
](
DataType
*
ptr
){
d
(
ptr
);
MemoryManager
<
DataType
>::
Deallocate
(
ptr
);
});
...
...
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