Coder Social home page Coder Social logo

c9y's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

c9y's Issues

parallel for_each

namespace c9y 
{
    template <typename IterT, typename Pred>
    void for_each(IterT begin, IterT end, Pred pred);
}

c9y::for_each is a parallel version of std::for_each. It executes the predicate for the sequence in multiple threads.

The following issues are open:

  • partitioning
  • number of threads
  • reuse of a thread pool

Compile error latch::max

latch::max may result in compile error if max is defined as a macro previously. Granted, this is the "fault" of the person including the header, but as a convenience undef the macro in the latch.h header.

Add CMake Build

For Linux and Mac support and integration into vcpkg configure CMake build environment.

Coroutines missing.

The __cpp_lib_coroutine is false, even though it should be true. Investigate.

CI

Implement basic CI using github actions.

do_async

void do_async(sigc::slot<void> func);

The do_async function takes a slot and executes this slot in a different thread. The main idea behind the function is to asynchronously execute bits of code with relative little coding overhead.

As a design constraint it may be assumed that the asynchronous slot will take a long time to execute and thus creating a new separate thread is feasible.

jthread

The clang version on github and vcpkg's azure devops does not have jthread. To help downstream libraries, write a drop in replacement for jthread.

CI: CMake Check Script

Write a script that checks if all headers and sources are contained in the CMake file.

Async Algorithms

There was a design to implement std algorithms as async; node style. This would be a useful feature.

Merge Async and Paralell TaksPools

The reason why there are 2 pools is so that if a parallel algorithm is called from an async thread, it does not starve, since the thread itself does not work towards the parallel goal. The down side is that now you potentially have 2 times the hardware parallelism, which can lead to unnecessary contention.
To achieve this, thread must also work towards the parallel goal. The problem is it can't pick up any tasks, since tasks could potentially be long running.

Shorthand for Lock<Mutex>

The Lock<Mutex> class is used quite often. But in external namespaces c9y::Lock<c9y::Mutex> is kind of verbatim it may be useful to introduce a typedef c9y::MutexLock.

Better Documentation

Write documentation that is more comprehensive than the API doc. This is especially true for coroutines, since much of the code is only magic behind the scenes.

Inconsistency in c9y.h

Description

The "catch all" header c9y.h does not include the entire library.

Steps to Reproduce

  1. Include <c9y/c9y.h> into cpp file.
  2. Try to reference c9y::sync_point

Expected

If the c9y.h header exists all (public) bits of the library should be made available; alternatively no catch all header should exist.

Observed

The c9y.h "catch all" header exists but only exposes a subset of the entire library.

Timeout for Condition::wait

Some scenarios do not want to wait to wait indefinably. We need to add an overload taking a timeout value in ms.

0.5.0 Release Tasks

  • update Changelog
  • update version in defines.h
  • update version in vcpkg.json
  • update version in CMake

Refined MSBuild CI build steps.

Integrate learning of other build steps:

  • nuget vcpkg cache
  • put release and debug builds together (less vcpkg)
  • add triplet to cache key

Timer

A Timer object is of good use.

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.