Skip to content

Commit

Permalink
Make better use of reference counted arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Pencilcaseman committed Aug 4, 2023
1 parent 88bbc7a commit 4f60eee
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 131 deletions.
6 changes: 3 additions & 3 deletions librapid/include/librapid/array/function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace librapid {
/// Constructs a Function from a functor and arguments.
/// \param functor The functor to use.
/// \param args The arguments to use.
LIBRAPID_ALWAYS_INLINE explicit Function(Functor &&functor, Args &&...args);
LIBRAPID_ALWAYS_INLINE explicit Function(const Functor &functor, const Args &...args);

/// Constructs a Function from another function.
/// \param other The Function to copy.
Expand Down Expand Up @@ -203,8 +203,8 @@ namespace librapid {
};

template<typename desc, typename Functor, typename... Args>
Function<desc, Functor, Args...>::Function(Functor &&functor, Args &&...args) :
m_functor(std::forward<Functor>(functor)), m_args(std::forward<Args>(args)...) {}
Function<desc, Functor, Args...>::Function(const Functor &functor, const Args &...args) :
m_functor(functor), m_args(args...) {}

template<typename desc, typename Functor, typename... Args>
auto Function<desc, Functor, Args...>::shape() const {
Expand Down
Loading

0 comments on commit 4f60eee

Please sign in to comment.