Commit 4b6552ed authored by Martin Reinecke's avatar Martin Reinecke

small fixes

parent d51bd1ec
Pipeline #79775 passed with stages
in 16 minutes and 41 seconds
/* /*
* This file is part of pocketfft. This file is part of pocketfft.
* Licensed under a 3-clause BSD style license - see LICENSE.md
*/ Copyright (C) 2010-2020 Max-Planck-Society
Copyright (C) 2019 Peter Bell
Authors: Martin Reinecke, Peter Bell
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* /*
* Python interface. * Python interface.
*
* Copyright (C) 2019-2020 Max-Planck-Society
* Copyright (C) 2019 Peter Bell
* \author Martin Reinecke
* \author Peter Bell
*/ */
#include <pybind11/pybind11.h> #include <pybind11/pybind11.h>
......
...@@ -56,7 +56,7 @@ template<typename T> class membuf ...@@ -56,7 +56,7 @@ template<typename T> class membuf
: d(d_), rw(false) {} : d(d_), rw(false) {}
// allocate own memory // allocate own memory
membuf(size_t sz) membuf(size_t sz)
: ptr(make_unique<vector<T>>(sz)), d(ptr->data()), rw(true) {} : ptr(make_shared<vector<T>>(sz)), d(ptr->data()), rw(true) {}
// share another memory buffer, but read-only // share another memory buffer, but read-only
membuf(const membuf &other) membuf(const membuf &other)
: ptr(other.ptr), d(other.d), rw(false) {} : ptr(other.ptr), d(other.d), rw(false) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment