Loading...
Searching...
No Matches
resizable_parallel_runner_cxx.h
Go to the documentation of this file.
// Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
#define JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
#include <jxl/memory_manager.h>
#include <jxl/resizable_parallel_runner.h>
#include <memory>
#ifndef __cplusplus
#error \
"This a C++ only header. Use jxl/jxl_resizable_parallel_runner.h from C" \
"sources."
#endif
struct JxlResizableParallelRunnerDestroyStruct {
void operator()(void* runner) { JxlResizableParallelRunnerDestroy(runner); }
};
typedef std::unique_ptr<void, JxlResizableParallelRunnerDestroyStruct>
JxlResizableParallelRunnerPtr;
static inline JxlResizableParallelRunnerPtr JxlResizableParallelRunnerMake(
const JxlMemoryManager* memory_manager) {
return JxlResizableParallelRunnerPtr(
JxlResizableParallelRunnerCreate(memory_manager));
}
#endif // JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
JxlResizableParallelRunnerPtr
std::unique_ptr< void, JxlResizableParallelRunnerDestroyStruct > JxlResizableParallelRunnerPtr
Definition resizable_parallel_runner_cxx.h:43
JxlResizableParallelRunnerDestroy
JXL_THREADS_EXPORT void JxlResizableParallelRunnerDestroy(void *runner_opaque)
JxlResizableParallelRunnerCreate
JXL_THREADS_EXPORT void * JxlResizableParallelRunnerCreate(const JxlMemoryManager *memory_manager)
memory_manager.h
Abstraction functions used by JPEG XL to allocate memory.
resizable_parallel_runner.h
implementation using std::thread of a resizeable JxlParallelRunner.
JxlMemoryManagerStruct
Definition memory_manager.h:51
JxlResizableParallelRunnerDestroyStruct
Definition resizable_parallel_runner_cxx.h:32
JxlResizableParallelRunnerDestroyStruct::operator()
void operator()(void *runner)
Calls JxlResizableParallelRunnerDestroy() on the passed runner.
Definition resizable_parallel_runner_cxx.h:34