LIBJXL
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 
11 
12 #ifndef JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
13 #define JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
14 
15 #include <memory>
16 
18 
19 #if !(defined(__cplusplus) || defined(c_plusplus))
20 #error \
21  "This a C++ only header. Use jxl/jxl_resizable_parallel_runner.h from C" \
22  "sources."
23 #endif
24 
29  void operator()(void* runner) { JxlResizableParallelRunnerDestroy(runner); }
30 };
31 
37 typedef std::unique_ptr<void, JxlResizableParallelRunnerDestroyStruct>
39 
53 static inline JxlResizableParallelRunnerPtr JxlResizableParallelRunnerMake(
54  const JxlMemoryManager* memory_manager) {
56  JxlResizableParallelRunnerCreate(memory_manager));
57 }
58 
59 #endif // JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
implementation using std::thread of a resizeable JxlParallelRunner.
JXL_THREADS_EXPORT void JxlResizableParallelRunnerDestroy(void *runner_opaque)
JXL_THREADS_EXPORT void * JxlResizableParallelRunnerCreate(const JxlMemoryManager *memory_manager)
std::unique_ptr< void, JxlResizableParallelRunnerDestroyStruct > JxlResizableParallelRunnerPtr
Definition: resizable_parallel_runner_cxx.h:38
Definition: memory_manager.h:48
Definition: resizable_parallel_runner_cxx.h:27
void operator()(void *runner)
Calls JxlResizableParallelRunnerDestroy() on the passed runner.
Definition: resizable_parallel_runner_cxx.h:29