LIBJXL
Toggle main menu visibility
Loading...
Searching...
No Matches
resizable_parallel_runner_cxx.h
Go to the documentation of this file.
1
// Copyright (c) the JPEG XL Project Authors. All rights reserved.
2
//
3
// Use of this source code is governed by a BSD-style
4
// license that can be found in the LICENSE file.
5
15
16
#ifndef JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
17
#define JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
18
19
#include <
jxl/memory_manager.h
>
20
#include <
jxl/resizable_parallel_runner.h
>
21
22
#include <memory>
23
24
#ifndef __cplusplus
25
#error \
26
"This a C++ only header. Use jxl/jxl_resizable_parallel_runner.h from C" \
27
"sources."
28
#endif
29
32
struct
JxlResizableParallelRunnerDestroyStruct
{
34
void
operator()
(
void
* runner) {
JxlResizableParallelRunnerDestroy
(runner); }
35
};
36
42
typedef
std::unique_ptr<void, JxlResizableParallelRunnerDestroyStruct>
43
JxlResizableParallelRunnerPtr
;
44
57
static
inline
JxlResizableParallelRunnerPtr
JxlResizableParallelRunnerMake(
58
const
JxlMemoryManager
* memory_manager) {
59
return
JxlResizableParallelRunnerPtr
(
60
JxlResizableParallelRunnerCreate
(memory_manager));
61
}
62
63
#endif
// JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
64
JxlMemoryManager
struct JxlMemoryManagerStruct JxlMemoryManager
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.
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
jxl
resizable_parallel_runner_cxx.h
Generated by
1.17.0