#pragma once
#include <stddef.h>
#include <stdint.h>
#include "threadpool-common.h"
#include "threadpool-atomics.h"
#if PTHREADPOOL_USE_CONDVAR || PTHREADPOOL_USE_FUTEX
#include <pthread.h>
#endif
#if PTHREADPOOL_USE_GCD
#include <dispatch/dispatch.h>
#endif
#if PTHREADPOOL_USE_EVENT
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
#include <fxdiv.h>
#include <pthreadpool.h>
#define THREADPOOL_COMMAND_MASK …
enum threadpool_command { … };
struct PTHREADPOOL_CACHELINE_ALIGNED thread_info { … };
PTHREADPOOL_STATIC_ASSERT(…);
struct pthreadpool_1d_with_uarch_params { … };
struct pthreadpool_1d_tile_1d_params { … };
struct pthreadpool_2d_params { … };
struct pthreadpool_2d_tile_1d_params { … };
struct pthreadpool_2d_tile_1d_with_uarch_params { … };
struct pthreadpool_2d_tile_2d_params { … };
struct pthreadpool_2d_tile_2d_with_uarch_params { … };
struct pthreadpool_3d_params { … };
struct pthreadpool_3d_tile_1d_params { … };
struct pthreadpool_3d_tile_1d_with_uarch_params { … };
struct pthreadpool_3d_tile_2d_params { … };
struct pthreadpool_3d_tile_2d_with_uarch_params { … };
struct pthreadpool_4d_params { … };
struct pthreadpool_4d_tile_1d_params { … };
struct pthreadpool_4d_tile_2d_params { … };
struct pthreadpool_4d_tile_2d_with_uarch_params { … };
struct pthreadpool_5d_params { … };
struct pthreadpool_5d_tile_1d_params { … };
struct pthreadpool_5d_tile_2d_params { … };
struct pthreadpool_6d_params { … };
struct pthreadpool_6d_tile_1d_params { … };
struct pthreadpool_6d_tile_2d_params { … };
struct PTHREADPOOL_CACHELINE_ALIGNED pthreadpool { … };
PTHREADPOOL_STATIC_ASSERT(…);
PTHREADPOOL_INTERNAL struct pthreadpool* pthreadpool_allocate(
size_t threads_count);
PTHREADPOOL_INTERNAL void pthreadpool_deallocate(
struct pthreadpool* threadpool);
thread_function_t;
PTHREADPOOL_INTERNAL void pthreadpool_parallelize(
struct pthreadpool* threadpool,
thread_function_t thread_function,
const void* params,
size_t params_size,
void* task,
void* context,
size_t linear_range,
uint32_t flags);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_1d_with_thread_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_1d_with_uarch_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_1d_tile_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_with_thread_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_tile_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_tile_1d_with_uarch_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_tile_1d_with_uarch_with_thread_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_tile_2d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_2d_tile_2d_with_uarch_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_tile_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_tile_1d_with_thread_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_tile_1d_with_uarch_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_tile_1d_with_uarch_with_thread_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_tile_2d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_3d_tile_2d_with_uarch_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_4d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_4d_tile_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_4d_tile_2d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_4d_tile_2d_with_uarch_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_5d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_5d_tile_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_5d_tile_2d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_6d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_6d_tile_1d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);
PTHREADPOOL_INTERNAL void pthreadpool_thread_parallelize_6d_tile_2d_fastpath(
struct pthreadpool* threadpool,
struct thread_info* thread);