forked from ornladios/ADIOS2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't force initialization for buffers whose contents we will immedia…
…tely destroy (ornladios#4031) * BufferMalloc
- Loading branch information
1 parent
1e63aaa
commit 271b809
Showing
10 changed files
with
420 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
* | ||
* BP5Reader.h | ||
* | ||
* Created on: Aug 1, 2018 | ||
* Author: Lipeng Wan [email protected] | ||
*/ | ||
|
||
#ifndef ADIOS2_ENGINE_BP5_BP5READER_H_ | ||
|
@@ -18,6 +16,7 @@ | |
#include "adios2/helper/adiosComm.h" | ||
#include "adios2/helper/adiosRangeFilter.h" | ||
#include "adios2/toolkit/format/bp5/BP5Deserializer.h" | ||
#include "adios2/toolkit/format/buffer/heap/BufferMalloc.h" | ||
#include "adios2/toolkit/remote/Remote.h" | ||
#include "adios2/toolkit/transportman/TransportMan.h" | ||
|
||
|
@@ -225,7 +224,7 @@ class BP5Reader : public BP5Engine, public Engine | |
|
||
format::BufferSTL m_MetadataIndex; | ||
format::BufferSTL m_MetaMetadata; | ||
format::BufferSTL m_Metadata; | ||
format::BufferMalloc m_Metadata; | ||
|
||
void InstallMetaMetaData(format::BufferSTL MetaMetadata); | ||
void InstallMetadataForTimestep(size_t Step); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
* adiosMemory.h : Memory copy operations functions using std::copy std::insert | ||
* and std::memcpy | ||
* | ||
* Created on: May 17, 2017 | ||
* Author: William F Godoy [email protected] | ||
*/ | ||
|
||
#ifndef ADIOS2_HELPER_ADIOSMEMORY_H_ | ||
|
@@ -83,7 +81,7 @@ void CopyToBufferThreads(std::vector<char> &buffer, size_t &position, const T *s | |
const size_t elements = 1, const unsigned int threads = 1) noexcept; | ||
|
||
template <class T> | ||
void ReverseCopyFromBuffer(const std::vector<char> &buffer, size_t &position, T *destination, | ||
void ReverseCopyFromBuffer(const char *buffer, size_t &position, T *destination, | ||
const size_t elements = 1) noexcept; | ||
|
||
/** | ||
|
@@ -95,7 +93,7 @@ void ReverseCopyFromBuffer(const std::vector<char> &buffer, size_t &position, T | |
* @param elements number of elements of destination type | ||
*/ | ||
template <class T> | ||
void CopyFromBuffer(const std::vector<char> &buffer, size_t &position, T *destination, | ||
void CopyFromBuffer(const char *buffer, size_t &position, T *destination, | ||
const size_t elements = 1) noexcept; | ||
|
||
/** | ||
|
@@ -110,6 +108,9 @@ template <class T> | |
T ReadValue(const std::vector<char> &buffer, size_t &position, | ||
const bool isLittleEndian = true) noexcept; | ||
|
||
template <class T> | ||
T ReadValue(const char *buffer, size_t &position, const bool isLittleEndian = true) noexcept; | ||
|
||
/** Read in 'nElems' elements from buffer into output array | ||
* output must be pre-allocated. | ||
*/ | ||
|
Oops, something went wrong.