GithubHelp home page GithubHelp logo

oraqlle / cortexlib Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.28 MB

A library of general purpose types, classes, functions, algorithms, utilities and other components for C++.

Home Page: https://oraqlle.github.io/cortexlib/

License: MIT License

C++ 100.00%
cpp cpp20 library package

cortexlib's Introduction

oraqlle

Just a dude who loves writing (and talking about) software.

Info

cortexlib's People

Contributors

oraqlle avatar

cortexlib's Issues

[Feature] box_view

A view over contiguous data (like std::span) but allows for all of boxes operations on that data as if it were a box. Operators and maps can then return a view of the modified data without changing it initially. Might add better composability to box operations.

Documentation overhaul

Complete re-write of documentation for all components, libraries etc.
Find a good doc generation tool

Memoize Function Factory

A factory function that creates a function that memoizes the result according to the input parameters

[API] Array Paradigm Operator Overloads

Remove element-wise operator overloads in favor of using operators as verbs, similar to how array-notational languages work.

auto sum = std::plus{} / bx  ///< folds left
auto nbx = bx / 3;  ///< element-wise division by 3

[Bug] Remove uses of std::ranges library that cause clang issues

Clang doesn't like gcc's implementation of std::ranges yet as it hasn't finished reducing the need for typename causing compile issues. This could be resolved by using different standard algorithms so we can build against clang as well. Removing the header might also work.

[Bug] box::operator[] disqualifies `const`

The current implementation of box::slice and box:::operator[] (slicing operator) currently don't have both const and non-const qualified versions. When called on a const box object, this discards qualifiers. A const qualified version should be added for box::operator[] and a non-const for box::slice.

/// Non-const slice
constexpr auto
slice(size_type ridx) /* no const */
    -> std::span<value_type>
{
    if (ridx >= m_rows)
        throw std::out_of_range("box::slice - row index out of range");

        return std::span<value_type>{
            _M_data_ptr(m_start) + ridx * m_columns,
            m_columns
        };
}

/// `const` operator[]
constexpr auto
operator[](size_type ridx) const ///< `const` added here
    -> std::span<value_type>
{ return slice(ridx); }

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.