Giter VIP home page Giter VIP logo

dsac's People

Contributors

dymons avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

dsac's Issues

Improve the current implementation dsac::future

The current implementation of dsac::future does not have part of the required API

  • Implement a specialization for dsac::future / dsac::promise / dsac::result
  • Implement a specialization for dsac::mvar<T>::try_with_lock -> void

Remove unnecessary allocations in the pattern Registrator

Each time an object is created, memory allocation is performed on the heap. Objects whose size is smaller than a machine word must be allocated on the stack with the use of technology Small Object Optimization

template <typename BaseComponent, typename DerivedComponent, typename... Args>
std::unique_ptr<BaseComponent> factory_constructor<BaseComponent, DerivedComponent, Args...>::construct(
Args&&... args) const {
return std::make_unique<DerivedComponent>(std::forward<Args>(args)...);
}

Finish the implementation of a dynamic array

A dynamic array in its current implementation does not have the following functionality.

  • move constructor
  • assigns values to the container by using assign(...)
  • access the first element
  • access the last element
  • direct access to the underlying array
  • returns a reverse iterator to the beginning
  • returns a reverse iterator to the end
  • returns the maximum possible number of elements
  • reserves storage
  • reduces memory usage by freeing unused memory
  • inserts elements
  • constructs element in-place
  • erases elements
  • constructs an element in-place at the end
  • removes the last element
  • changes the number of elements stored
  • swap method
  • lexicographically compares the values in the vector

Figure out why using REQUIRED we get Data Race in the Catch2

When the REQUIRED macro is used in multithreaded execution, this leads to a data race in the library. An example of such a performance can be reproduced within this test:

TEST_CASE("Access to a shared resource with a limited number of threads", "[barrier]") {
constexpr std::size_t kNumberWorkers = 10u;
dsac::barrier barrier{kNumberWorkers};
dsac::executor_base_ref executor = dsac::make_static_thread_pool(kNumberWorkers);
dsac::dynamic_array<bool> arrived(kNumberWorkers, false);
for (std::size_t i{}; i < kNumberWorkers; ++i) {
executor->submit([index = i, &arrived, &barrier]() {
arrived[index] = true;
barrier.arrive_and_wait();
assert(std::all_of(arrived.begin(), arrived.end(), kIsTrue));
barrier.arrive_and_wait();
arrived[index] = false;
barrier.arrive_and_wait();
assert(std::all_of(arrived.begin(), arrived.end(), std::not_fn(kIsTrue)));
});
}
executor->join();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.