Skip to content

Commit

Permalink
Merge 0c75af9 into 340ce42
Browse files Browse the repository at this point in the history
  • Loading branch information
mclarsen committed Jul 29, 2021
2 parents 340ce42 + 0c75af9 commit d47302e
Show file tree
Hide file tree
Showing 13 changed files with 1,239 additions and 302 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,11 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s

## Unreleased

### Added

#### General
- Added support to register custom memory allocators and a custom data movement handler. This allows conduit to move trees of data between heterogenous memory spaces (e.g. CPU and GPU memory). See conduit_utils.hpp for API details.

### Changed

#### Relay
Expand Down
18 changes: 8 additions & 10 deletions src/libs/conduit/conduit_data_array.cpp
Expand Up @@ -1625,16 +1625,14 @@ void
DataArray<T>::compact_elements_to(uint8 *data) const
{
// copy all elements
index_t num_ele = m_dtype.number_of_elements();
index_t ele_bytes = DataType::default_bytes(m_dtype.id());
uint8 *data_ptr = data;
for(index_t i=0;i<num_ele;i++)
{
memcpy(data_ptr,
element_ptr(i),
(size_t)ele_bytes);
data_ptr+=ele_bytes;
}
index_t ele_bytes = DataType::default_bytes(dtype().id());

utils::conduit_memcpy_strided_elements(data, // dest
(size_t)dtype().number_of_elements(), // num eles to copy
ele_bytes, // bytes per element
ele_bytes, // dest stride per ele
element_ptr(0), // src
(size_t)dtype().stride()); // src stride per ele
}


Expand Down
4 changes: 1 addition & 3 deletions src/libs/conduit/conduit_endianness_types.h
@@ -1,5 +1,3 @@
// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit
// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
// other details. No copyright assignment is required to contribute to Conduit.

//-----------------------------------------------------------------------------
Expand All @@ -12,7 +10,7 @@
#define CONDUIT_ENDIANNESS_TYPES_H

//-----------------------------------------------------------------------------
/// conduit_endianness_type_id is an Enumeration used to describe the
/// conduit_endianness_type_id is an Enumeration used to describe the
/// endianness cases supported by conduit
//-----------------------------------------------------------------------------
typedef enum
Expand Down

0 comments on commit d47302e

Please sign in to comment.