#ifndef __AMSCU_CPUTHREADING_HPP__
#define __AMSCU_CPUTHREADING_HPP__

namespace amscuda
{
namespace util
{

int amscpu_cputhreading_threadplan(int probsize);

//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 dynamic number of threads
//psize must be supplied, which will call amscpu_cputhreading_threadplan to determine number of threads to use for execution
template<typename callable, typename ... argst> int threaded_execute(callable &&fptr, int64_t psize, argst&&... args);


};
};

#include <amsculib3/util/amscu_cputhreading_impl.hpp>

#endif 