Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ repos:
files: \.(c|cc|cxx|cpp|h|hpp|hxx)$
entry: clang-format -i
args: [--style=file]
additional_dependencies: [clang-format]
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Both methods are supported. However, for most users we _strongly_ recommend to b
- Boost.Container: header-only
- Boost.Test: header-only or (optionally) as a compiled library, *only used for unit testing*
- Boost.Range: header-only, *only used for unit testing*
- [BTAS](http://github.com/ValeevGroup/BTAS), tag 8752fb97fc68d1982c48283aba4b03c744389ba8 . If usable BTAS installation is not found, TiledArray will download and compile
- [BTAS](http://github.com/ValeevGroup/BTAS), tag bbb11894802d7e2f89182a2e7fce9aed1078f851 . If usable BTAS installation is not found, TiledArray will download and compile
BTAS from source. *This is the recommended way to compile BTAS for all users*.
- [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag b22ee85059e6ccc9a6e803ba0550652ece8d9df1 .
Only the MADworld runtime and BLAS/LAPACK C API component of MADNESS is used by TiledArray.
Expand Down
4 changes: 2 additions & 2 deletions external/versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ set(TA_TRACKED_MADNESS_PREVIOUS_TAG 925552feaf326cca8e83de7bd042074ad3cfd3f1)
set(TA_TRACKED_MADNESS_VERSION 0.10.1)
set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1)

set(TA_TRACKED_BTAS_TAG 8752fb97fc68d1982c48283aba4b03c744389ba8)
set(TA_TRACKED_BTAS_PREVIOUS_TAG 1ee43ef413c12166e3ce3db2ac69160c7622f497)
set(TA_TRACKED_BTAS_TAG bbb11894802d7e2f89182a2e7fce9aed1078f851)
set(TA_TRACKED_BTAS_PREVIOUS_TAG 8752fb97fc68d1982c48283aba4b03c744389ba8)

set(TA_TRACKED_CUTT_TAG 0e8685bf82910bc7435835f846e88f1b39f47f09)
set(TA_TRACKED_CUTT_PREVIOUS_TAG 592198b93c93b7ca79e7900b9a9f2e79f9dafec3)
Expand Down
87 changes: 0 additions & 87 deletions src/TiledArray/external/btas.h
Original file line number Diff line number Diff line change
Expand Up @@ -851,91 +851,4 @@ struct Cast<TiledArray::Tensor<T, Allocator>,
};
} // namespace TiledArray

namespace madness {
namespace archive {

template <class Archive, typename T>
struct ArchiveLoadImpl<Archive, btas::varray<T>> {
static inline void load(const Archive& ar, btas::varray<T>& x) {
typename btas::varray<T>::size_type n{};
ar& n;
x.resize(n);
for (typename btas::varray<T>::value_type& xi : x) ar& xi;
}
};

template <class Archive, typename T>
struct ArchiveStoreImpl<Archive, btas::varray<T>> {
static inline void store(const Archive& ar, const btas::varray<T>& x) {
ar& x.size();
for (const typename btas::varray<T>::value_type& xi : x) ar& xi;
}
};

template <class Archive, blas::Layout _Order, typename _Index>
struct ArchiveLoadImpl<Archive, btas::BoxOrdinal<_Order, _Index>> {
static inline void load(const Archive& ar,
btas::BoxOrdinal<_Order, _Index>& o) {
typename btas::BoxOrdinal<_Order, _Index>::stride_type stride{};
typename btas::BoxOrdinal<_Order, _Index>::value_type offset{};
bool cont{};
ar& stride& offset& cont;
o = btas::BoxOrdinal<_Order, _Index>(std::move(stride), std::move(offset),
std::move(cont));
}
};

template <class Archive, blas::Layout _Order, typename _Index>
struct ArchiveStoreImpl<Archive, btas::BoxOrdinal<_Order, _Index>> {
static inline void store(const Archive& ar,
const btas::BoxOrdinal<_Order, _Index>& o) {
ar& o.stride() & o.offset() & o.contiguous();
}
};

template <class Archive, blas::Layout _Order, typename _Index,
typename _Ordinal>
struct ArchiveLoadImpl<Archive, btas::RangeNd<_Order, _Index, _Ordinal>> {
static inline void load(const Archive& ar,
btas::RangeNd<_Order, _Index, _Ordinal>& r) {
typedef typename btas::BaseRangeNd<
btas::RangeNd<_Order, _Index, _Ordinal>>::index_type index_type;
index_type lobound{}, upbound{};
_Ordinal ordinal{};
ar& lobound& upbound& ordinal;
r = btas::RangeNd<_Order, _Index, _Ordinal>(
std::move(lobound), std::move(upbound), std::move(ordinal));
}
};

template <class Archive, blas::Layout _Order, typename _Index,
typename _Ordinal>
struct ArchiveStoreImpl<Archive, btas::RangeNd<_Order, _Index, _Ordinal>> {
static inline void store(const Archive& ar,
const btas::RangeNd<_Order, _Index, _Ordinal>& r) {
ar& r.lobound() & r.upbound() & r.ordinal();
}
};

template <class Archive, typename _T, class _Range, class _Store>
struct ArchiveLoadImpl<Archive, btas::Tensor<_T, _Range, _Store>> {
static inline void load(const Archive& ar,
btas::Tensor<_T, _Range, _Store>& t) {
_Range range{};
_Store store{};
ar& range& store;
t = btas::Tensor<_T, _Range, _Store>(std::move(range), std::move(store));
}
};

template <class Archive, typename _T, class _Range, class _Store>
struct ArchiveStoreImpl<Archive, btas::Tensor<_T, _Range, _Store>> {
static inline void store(const Archive& ar,
const btas::Tensor<_T, _Range, _Store>& t) {
ar& t.range() & t.storage();
}
};
} // namespace archive
} // namespace madness

#endif /* TILEDARRAY_EXTERNAL_BTAS_H__INCLUDED */
28 changes: 1 addition & 27 deletions src/TiledArray/util/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#ifndef TILEDARRAY_UTIL_VECTOR_H
#define TILEDARRAY_UTIL_VECTOR_H

#include "TiledArray/config.h"
#include <boost/container/small_vector.hpp>
#include <vector>
#include "TiledArray/config.h"

#include <TiledArray/utility.h>
#include <madness/world/archive.h>
Expand Down Expand Up @@ -84,32 +84,6 @@ constexpr auto iv(Int i0, Ints... rest) {
} // namespace container
} // namespace TiledArray

namespace madness {
namespace archive {

template <class Archive, typename T, std::size_t N, typename A>
struct ArchiveLoadImpl<Archive, boost::container::small_vector<T, N, A>> {
static inline void load(const Archive& ar,
boost::container::small_vector<T, N, A>& x) {
std::size_t n{};
ar& n;
x.resize(n);
for (auto& xi : x) ar& xi;
}
};

template <class Archive, typename T, std::size_t N, typename A>
struct ArchiveStoreImpl<Archive, boost::container::small_vector<T, N, A>> {
static inline void store(const Archive& ar,
const boost::container::small_vector<T, N, A>& x) {
ar& x.size();
for (const auto& xi : x) ar& xi;
}
};

} // namespace archive
} // namespace madness

namespace TiledArray {

/// Vector output stream operator
Expand Down