A very basic class for any image.
Context & getContext() const
virtual const pixbyte * getData(int x, int y) const =0
Returns a pointer to given pixel.
virtual const msize getMemorySize() const =0
Bitmap size in bytes.
void unlock(AbstractBitmap *bitmap)
Drops a lock to the bitmap.
void writeLock(GraphicPipeline *gpu, AbstractBitmap *bitmap, ProcessingTarget target)
Locks content of a bitmap for writing using a specific processing target device.
Loads a bitmap content from chunk.
virtual void afterProcessing(ThreadIndex threadCount, GraphicPipeline *gpu, bool aborted)
Instruction called after the task is executed.
static void load(AbstractBitmap &bitmap, ChunkCollection &collection, const std::string &chunkId)
Loads a bitmap content from a given collection and chunk.
ChunkCollection * collection
virtual bool process(TaskThread &thread)
Executes the task on CPU within a given thread.
virtual void beforeProcessing(ThreadIndex threadCount, ProcessingTarget target, GraphicPipeline *gpu)
Instruction called before the task is executed.
A key-value pair set storing pieces of arbitrary data (chunks) under string keys.
virtual bool chunkExists(const std::string &id) const =0
Check if a specific chunk exists.
virtual chunksize_t chunkSize(const std::string &id) const =0
Retrieves size of a specific chunk.
virtual chunksize_t fetch(const std::string &id, void *data, const chunksize_t limit)=0
Reads a chunk.
float performTask(AbstractTask &task, const PoolIndex pool=DEFAULT_POOL)
Performs a given task.
Internal low-level GPU control API.
static void check(const bool condition, const std::string &message)
unsigned char ThreadIndex
number of threads / thread index
std::string to_string(Beatmup::NNets::ActivationFunction function)
Beatmup::InternalBitmap * bitmap
Beatmup::NNets::InferenceTask * task