Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Closed
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
3 changes: 2 additions & 1 deletion .github/workflows/gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
strategy:
matrix:
CONFIG: ["TYPE=debug OS=fedora OS_VER=32 PUSH_IMAGE=1",
"TYPE=debug OS=fedora OS_VER=34 PUSH_IMAGE=1",
"TYPE=debug OS=ubuntu OS_VER=20.04 PUSH_IMAGE=1 CHECK_CPP_STYLE=1",
"TYPE=debug OS=ubuntu OS_VER=20.04 COVERAGE=1",
"TYPE=release OS=fedora OS_VER=32",
Expand Down Expand Up @@ -77,7 +78,7 @@ jobs:
github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/stable-')
strategy:
matrix:
CONFIG: ["TYPE=doc OS=fedora OS_VER=32"]
CONFIG: ["TYPE=doc OS=fedora OS_VER=34"]
steps:
- name: Clone the git repo
uses: actions/checkout@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/other_OSes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
"OS=debian OS_VER=unstable",
"OS=debian OS_VER=latest",
"OS=fedora OS_VER=33",
"OS=fedora OS_VER=34",
"TYPE=package OS=fedora OS_VER=34 PUSH_IMAGE=0",
"OS=fedora OS_VER=rawhide TESTS_PMREORDER=0",
"OS=opensuse-leap OS_VER=latest",
Expand Down
2,659 changes: 2,522 additions & 137 deletions doc/libpmemobj++.Doxyfile.in

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions include/libpmemobj++/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you find any issues or have suggestion about these bindings please file an
issue in https://github.com/pmem/libpmemobj-cpp/issues. The GitHub website
is also the main code repository location and it contains full usage examples.

### Introduction
# Introduction

During the development of libpmemobj, many difficulties were encountered and
compromises were made to make the C API as much user-friendly as possible. This
Expand Down Expand Up @@ -47,7 +47,7 @@ Please remember to take extra care when using _static class members_. They are
not stored in persistent memory, therefore their value will _not_ always be
consistent across subsequent executions or compilations of user applications.

### Compiler notice
# Compiler notice

The C++ bindings require a C++11 compliant compiler, therefore the minimal
versions of GCC and Clang are 4.8.1 and 3.3 respectively. However the
Expand All @@ -57,7 +57,7 @@ It is recommended to use these or newer versions of GCC or Clang.
A usage of the libpmemobj-cpp containers requires GCC >= 4.9.0 (see explanation
in the main README.md file).

### C++ standard notice
# C++ standard notice

Please note that the C++11 standard, section 3.8, states that a valid
non-trivially default constructible object (in other words, not plain old data)
Expand All @@ -77,7 +77,7 @@ practically speaking implementation defined. The only exception to this rule is
the use of polymorphic types, which are notably forbidden when using C++
bindings.

### Compatibility notice
# Compatibility notice

In libpmemobj 1.12 we introduced a new transaction handler type: pmem::obj::flat_transaction.
By defining LIBPMEMOBJ_CPP_USE_FLAT_TRANSACTION you can make pmem::obj::transaction to be
Expand All @@ -90,7 +90,7 @@ Be aware that the old behavior can lead to segfaults in some cases
(see tx_nested_struct_example in this
[example](https://github.com/pmem/libpmemobj-cpp/blob/master/examples/transaction/transaction.cpp)).

### Important classes/functions
# Important classes/functions

* Transactional allocations - make_persistent.hpp
* Transactional array allocations - make_persistent_array.hpp
Expand All @@ -103,7 +103,7 @@ Be aware that the old behavior can lead to segfaults in some cases
* Persistent memory pool - [pool](@ref pmem::obj::pool)
* Defrag class - [defrag](@ref pmem::obj::defrag)

## Persistent containers
# Persistent containers

The C++ standard library containers collection is something that persistent
memory programmers may want to use. Containers manage the lifetime of held
Expand All @@ -128,7 +128,7 @@ These methods guarantee atomicity, consistency and durability. Besides specific
internal implementation details, libpmemobj-cpp persistent memory containers
have the well-known STL-like interface and they work with STL algorithms.

### Available containers
## Available containers

* array with STL-like interface - [pmem::obj::array](@ref pmem::obj::array)
* string with STL-like interface - [pmem::obj::string](@ref pmem::obj::basic_string)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020-2021, Intel Corporation */

/**
* @file
* Persistent memory aware implementation of the concurrent skip list.
*/

#ifndef PMEMOBJ_CONCURRENT_SKIP_LIST_IMPL_HPP
#define PMEMOBJ_CONCURRENT_SKIP_LIST_IMPL_HPP

Expand Down Expand Up @@ -448,9 +453,9 @@ class geometric_level_generator {
};

/**
* Persistent memory aware implementation of the concurrent skip list. The
* implementation is based on the lock-based concurrent skip list algorithm
* described in
* Persistent memory aware implementation of the concurrent skip list.
*
* The implementation is based on the lock-based algorithm described in
* https://www.cs.tau.ac.il/~shanir/nir-pubs-web/Papers/OPODIS2006-BA.pdf.
*
* Our concurrent skip list implementation supports concurrent insertion and
Expand Down
4 changes: 2 additions & 2 deletions include/libpmemobj++/detail/ctl.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/* Copyright 2019-2021, Intel Corporation */

/**
* @file
* C++ ctl api.
* C++ ctl API.
*/

#ifndef LIBPMEMOBJ_CPP_CTL_HPP
Expand Down
7 changes: 6 additions & 1 deletion include/libpmemobj++/detail/pair.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/* Copyright 2020-2021, Intel Corporation */

/**
* @file
* Pair implementation.
*/

#ifndef LIBPMEMOBJ_PAIR_HPP
#define LIBPMEMOBJ_PAIR_HPP
Expand Down
9 changes: 7 additions & 2 deletions include/libpmemobj++/detail/persistent_pool_ptr.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2019, Intel Corporation */
/* Copyright 2018-2021, Intel Corporation */

/**
* @file
* Persistent pointer for pool handle.
*/

#ifndef PMEMOBJ_PERSISTENT_POOL_PTR_HPP
#define PMEMOBJ_PERSISTENT_POOL_PTR_HPP
Expand Down Expand Up @@ -420,7 +425,7 @@ class persistent_pool_ptr {
}

private:
/* offset of persistent object in a persistent memory pool*/
/* offset of persistent object in a persistent memory pool */
uint64_t off;

void
Expand Down
9 changes: 6 additions & 3 deletions include/libpmemobj++/detail/tagged_ptr.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2021, Intel Corporation */

/**
* @file
* Persistent tagged pointer.
*/

#ifndef LIBPMEMOBJ_CPP_TAGGED_PTR
#define LIBPMEMOBJ_CPP_TAGGED_PTR

Expand Down Expand Up @@ -163,10 +168,8 @@ struct tagged_ptr_impl {

PointerType ptr;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
friend std::atomic<tagged_ptr_impl<
friend struct std::atomic<tagged_ptr_impl<
P1, P2, obj::experimental::self_relative_ptr<void>>>;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
};

template <typename P1, typename P2>
Expand Down
8 changes: 4 additions & 4 deletions include/libpmemobj++/detail/temp_value.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/* Copyright 2019-2021, Intel Corporation */

/**
* @file
* temp_value template class for caching objects.
* template class for caching objects.
*/

#ifndef LIBPMEMOBJ_CPP_TEMP_VALUE_HPP
Expand Down Expand Up @@ -34,7 +34,7 @@ namespace detail
template <typename T, bool NoExcept, typename Enable = void>
struct temp_value;

/**
/*
* Specialization for non-throwing constructors and objects smaller than
* LIBPMEMOBJ_CPP_MAX_STACK_ALLOC_SIZE bytes. Constructs and stores value in
* underlying field.
Expand All @@ -59,7 +59,7 @@ struct temp_value<
T t;
};

/**
/*
* Specialization for throwing constructors or objects greater than or equal to
* LIBPMEMOBJ_CPP_MAX_STACK_ALLOC_SIZE bytes. Constructs and stores value in
* underlying field in pmem.
Expand Down
10 changes: 8 additions & 2 deletions include/libpmemobj++/experimental/atomic_self_relative_ptr.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020-2021, Intel Corporation */

/**
* @file
* Atomic specialization for self_relative_ptr.
*/

#ifndef LIBPMEMOBJ_CPP_ATOMIC_SELF_RELATIVE_PTR_HPP
#define LIBPMEMOBJ_CPP_ATOMIC_SELF_RELATIVE_PTR_HPP

Expand Down Expand Up @@ -237,9 +242,10 @@ namespace detail
{

/**
* can_do_snapshot atomic specialization for self_relative_ptr. Not thread safe.
* pmem::detail::can_do_snapshot atomic specialization for self_relative_ptr.
* Not thread safe.
*
* Use in a single threaded environment only.
* Use in a single-threaded environment only.
*/
template <typename T>
struct can_do_snapshot<std::atomic<obj::experimental::self_relative_ptr<T>>> {
Expand Down
25 changes: 16 additions & 9 deletions include/libpmemobj++/experimental/concurrent_map.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/* Copyright 2019-2021, Intel Corporation */

/**
* @file
* Persistent memory aware implementation of Intel TBB concurrent_map.
*/

#ifndef PMEMOBJ_CONCURRENT_MAP_HPP
#define PMEMOBJ_CONCURRENT_MAP_HPP
Expand All @@ -14,15 +19,17 @@ namespace obj
{
namespace experimental
{

/**
* Persistent memory aware implementation of Intel TBB concurrent_map. It is a
* sorted associative container that contains key-value pairs with unique keys.
* Keys are sorted by using the comparison function Compare. Search, removal,
* and insertion operations have average logarithmic complexity. Everywhere the
* concurrent_map uses the Compare requirements, uniqueness is determined by
* using the equivalence relation. In imprecise terms, two objects a and b are
* considered equivalent (not unique) if neither compares less than the other:
* !comp(a, b) && !comp(b, a).
* Persistent memory aware implementation of Intel TBB concurrent_map.
*
* A sorted associative container that contains key-value pairs with unique
* keys. Keys are sorted by using the comparison function Compare. Search,
* removal, and insertion operations have average logarithmic complexity.
* Everywhere the concurrent_map uses the Compare requirements, uniqueness is
* determined by using the equivalence relation. In imprecise terms, two objects
* a and b are considered equivalent (not unique) if neither compares less than
* the other: !comp(a, b) && !comp(b, a).
*
* The implementation is based on the lock-based concurrent skip list algorithm
* described in
Expand Down
28 changes: 26 additions & 2 deletions include/libpmemobj++/experimental/inline_string.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/* Copyright 2020-2021, Intel Corporation */

/**
* @file
Expand Down Expand Up @@ -90,9 +90,33 @@ class basic_inline_string {
obj::p<uint64_t> capacity_;
};

/**
* Most common specialization (for a char)
* for pmem::obj::experimental::basic_inline_string.
*
* @relatesalso pmem::obj::experimental::basic_inline_string
*/
using inline_string = basic_inline_string<char>;
/**
* Wide character specialization
* for pmem::obj::experimental::basic_inline_string.
*
* @relatesalso pmem::obj::experimental::basic_inline_string
*/
using inline_wstring = basic_inline_string<wchar_t>;
/**
* 16-bit character specialization
* for pmem::obj::experimental::basic_inline_string.
*
* @relatesalso pmem::obj::experimental::basic_inline_string
*/
using inline_u16string = basic_inline_string<char16_t>;
/**
* 32-bit character specialization
* for pmem::obj::experimental::basic_inline_string.
*
* @relatesalso pmem::obj::experimental::basic_inline_string
*/
using inline_u32string = basic_inline_string<char32_t>;

/**
Expand Down Expand Up @@ -417,7 +441,7 @@ struct total_sizeof {

/**
* A helper trait which calculates required memory capacity (in bytes) for a
* type.
* type. Specialization of pmem::obj::experimental::total_sizeof.
*
* Inline_string requires capacity of sizeof(basic_inline_string<CharT>) + size
* of the data itself.
Expand Down
Loading