end of day blah

This commit is contained in:
2025-05-22 22:22:21 -04:00
parent a0d8c9b3f6
commit f3b4801947
32 changed files with 1709 additions and 2 deletions

View File

@ -0,0 +1,38 @@
#ifndef __AMSMATHUTIL25_UTIL_HPP__
#define __AMSMATHUTIL25_UTIL_HPP__
namespace ams
{
//A template function that takes as input a function pointer and a series of arguments
//The function is executed with fptr(threadnum, nthreads, otherargs...) with a certain number of threads
//psize must be supplied to determine whether to execute in threaded mode or not.
template<typename callable, typename ... argst> int threaded_execute(callable &&fptr, int64_t psize, argst&&... args);
template<typename T1, typename T2> struct pair
{
public:
T1 a;
T2 b;
pair() {a = T1(); b = T2();}
pair(const T1 &_a, const T2& _b) {a = _a; b = _b;}
};
template<typename T1, typename T2, typename T3> struct triple
{
public:
T1 a;
T2 b;
T3 c;
triple() {a = T1(); b = T2(); c = T3();}
triple(const T1 &_a, const T2& _b, const T3& _c) {a = _a; b = _b; c = _c;}
};
}; //end namespace ams
#include <amsmathutil25/util/amsmathutil25_utilimpl.hpp>
#include <amsmathutil25/util/amsmathutil25_bufferops.hpp>
#include <amsmathutil25/util/amsmathutil25_amsarray.hpp>
#endif