10 #include "pxl/memory.hpp"
102 virtual const std::vector<uint32_t>
subIdList()
const = 0;
116 virtual Map*
buildMap(
const char* muFuncName,
const uint32_t taskCount) = 0;
170 virtual uint64_t
id()
const = 0;
233 template <
typename T>
236 if (count > 0 && count > SIZE_MAX /
sizeof(T))
Defines a function to be executed by each thread on the MU.
Manages device compute resources and offloads user applications.
virtual Result unmapMemory(uintptr_t virtualAddr)=0
Removes a remapMemory mapping. The backing is not freed.
Job(const Job &)=delete
Deleted copy constructor.
virtual Result load(const char *muBinaryPath)=0
Loads binary data into this job.
std::function< void(Job *job, void *arg)> AsyncCallback
Callback type for asynchronous job creation.
virtual Map * buildMap(const uint32_t taskCount)=0
create a map object from the job.
virtual void destroyMap(Map *map)=0
Destroys the specified map.
virtual const std::vector< uint32_t > subIdList() const =0
Returns the list of sub IDs associated with this job.
virtual Map * buildMap(const char *muFuncName, const uint32_t taskCount)=0
create a map object from the job.
virtual Result remapMemory(void *ptr, uintptr_t virtualAddr)=0
Makes this Job's private memory reachable by the kernel at a chosen address.
virtual uint32_t deviceId() const =0
Device this Job runs on.
virtual Result reload(const pxl::Module *module)=0
Swaps the loaded module on this job, keeping its Sub set.
T * allocateMemory(size_t count, AllocFlag flag=AllocFlag::None)
Allocates typed device memory used only by this Job.
virtual Result load(const pxl::Module *module)=0
Loads a module into this job.
virtual Result reload(const char *muBinaryPath)=0
Swaps the loaded binary on this job, keeping its Sub set.
virtual Map * buildMap(const pxl::Function *muFunc, const uint32_t taskCount)=0
create a map object from the job.
virtual void * allocateMemory(size_t size, AllocFlag flag=AllocFlag::None)=0
Allocates device memory used only by this Job.
virtual bool isLoaded() const =0
Check whether MU binary is loaded on the job.
virtual uint64_t id() const =0
Returns this Job's identifier.
Job & operator=(const Job &)=delete
Deleted copy assignment operator.
The Map class represents a map operation in the XCENA execution framework.
A container for Function of MU kernel binary.