end of day blah
This commit is contained in:
38
include/amsmathutil25/util/amsmathutil25_util.hpp
Normal file
38
include/amsmathutil25/util/amsmathutil25_util.hpp
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user