CleanUp: Renamed `BLI_task_pool_userdata` to `BLI_task_pool_user_data`
In preparation for {D7475}
This commit is contained in:
parent
23919d2275
commit
2d6ad88466
|
@ -1302,7 +1302,7 @@ static void loop_split_worker_do(LoopSplitTaskDataCommon *common_data,
|
|||
|
||||
static void loop_split_worker(TaskPool *__restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
LoopSplitTaskDataCommon *common_data = BLI_task_pool_userdata(pool);
|
||||
LoopSplitTaskDataCommon *common_data = BLI_task_pool_user_data(pool);
|
||||
LoopSplitTaskData *data = taskdata;
|
||||
|
||||
/* Temp edge vectors stack, only used when computing lnor spacearr. */
|
||||
|
|
|
@ -457,7 +457,7 @@ static void ocean_compute_displacement_y(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
|
||||
fftw_execute(o->_disp_y_plan);
|
||||
|
@ -467,7 +467,7 @@ static void ocean_compute_displacement_x(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
const float scale = osd->scale;
|
||||
const float chop_amount = osd->chop_amount;
|
||||
|
@ -498,7 +498,7 @@ static void ocean_compute_displacement_z(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
const float scale = osd->scale;
|
||||
const float chop_amount = osd->chop_amount;
|
||||
|
@ -529,7 +529,7 @@ static void ocean_compute_jacobian_jxx(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
const float chop_amount = osd->chop_amount;
|
||||
int i, j;
|
||||
|
@ -564,7 +564,7 @@ static void ocean_compute_jacobian_jzz(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
const float chop_amount = osd->chop_amount;
|
||||
int i, j;
|
||||
|
@ -599,7 +599,7 @@ static void ocean_compute_jacobian_jxz(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
const float chop_amount = osd->chop_amount;
|
||||
int i, j;
|
||||
|
@ -628,7 +628,7 @@ static void ocean_compute_normal_x(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
int i, j;
|
||||
|
||||
|
@ -649,7 +649,7 @@ static void ocean_compute_normal_z(TaskPool *__restrict pool,
|
|||
void *UNUSED(taskdata),
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
OceanSimulateData *osd = BLI_task_pool_userdata(pool);
|
||||
OceanSimulateData *osd = BLI_task_pool_user_data(pool);
|
||||
const Ocean *o = osd->o;
|
||||
int i, j;
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void BLI_task_pool_cancel(TaskPool *pool);
|
|||
bool BLI_task_pool_canceled(TaskPool *pool);
|
||||
|
||||
/* optional userdata pointer to pass along to run function */
|
||||
void *BLI_task_pool_userdata(TaskPool *pool);
|
||||
void *BLI_task_pool_user_data(TaskPool *pool);
|
||||
|
||||
/* optional mutex to use from run function */
|
||||
ThreadMutex *BLI_task_pool_user_mutex(TaskPool *pool);
|
||||
|
|
|
@ -234,7 +234,7 @@ BLI_INLINE bool parallel_range_next_iter_get(TaskParallelRangePool *__restrict r
|
|||
|
||||
static void parallel_range_func(TaskPool *__restrict pool, void *tls_data_idx, int thread_id)
|
||||
{
|
||||
TaskParallelRangePool *__restrict range_pool = BLI_task_pool_userdata(pool);
|
||||
TaskParallelRangePool *__restrict range_pool = BLI_task_pool_user_data(pool);
|
||||
TaskParallelTLS tls = {
|
||||
.thread_id = thread_id,
|
||||
.userdata_chunk = NULL,
|
||||
|
@ -446,7 +446,7 @@ static void parallel_range_func_finalize(TaskPool *__restrict pool,
|
|||
void *v_state,
|
||||
int UNUSED(thread_id))
|
||||
{
|
||||
TaskParallelRangePool *__restrict range_pool = BLI_task_pool_userdata(pool);
|
||||
TaskParallelRangePool *__restrict range_pool = BLI_task_pool_user_data(pool);
|
||||
TaskParallelRangeState *state = v_state;
|
||||
|
||||
for (int i = 0; i < range_pool->num_tasks; i++) {
|
||||
|
@ -666,7 +666,7 @@ static void parallel_iterator_func_do(TaskParallelIteratorState *__restrict stat
|
|||
|
||||
static void parallel_iterator_func(TaskPool *__restrict pool, void *userdata_chunk, int threadid)
|
||||
{
|
||||
TaskParallelIteratorState *__restrict state = BLI_task_pool_userdata(pool);
|
||||
TaskParallelIteratorState *__restrict state = BLI_task_pool_user_data(pool);
|
||||
|
||||
parallel_iterator_func_do(state, userdata_chunk, threadid);
|
||||
}
|
||||
|
@ -862,7 +862,7 @@ typedef struct ParallelMempoolState {
|
|||
|
||||
static void parallel_mempool_func(TaskPool *__restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
ParallelMempoolState *__restrict state = BLI_task_pool_userdata(pool);
|
||||
ParallelMempoolState *__restrict state = BLI_task_pool_user_data(pool);
|
||||
BLI_mempool_iter *iter = taskdata;
|
||||
MempoolIterData *item;
|
||||
|
||||
|
|
|
@ -992,7 +992,7 @@ bool BLI_task_pool_canceled(TaskPool *pool)
|
|||
return pool->do_cancel;
|
||||
}
|
||||
|
||||
void *BLI_task_pool_userdata(TaskPool *pool)
|
||||
void *BLI_task_pool_user_data(TaskPool *pool)
|
||||
{
|
||||
return pool->userdata;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ void evaluate_node(const DepsgraphEvalState *state, OperationNode *operation_nod
|
|||
|
||||
void deg_task_run_func(TaskPool *pool, void *taskdata, int thread_id)
|
||||
{
|
||||
void *userdata_v = BLI_task_pool_userdata(pool);
|
||||
void *userdata_v = BLI_task_pool_user_data(pool);
|
||||
DepsgraphEvalState *state = (DepsgraphEvalState *)userdata_v;
|
||||
|
||||
/* Evaluate node. */
|
||||
|
|
|
@ -1035,7 +1035,7 @@ typedef struct WriteTaskData {
|
|||
|
||||
static void write_result_func(TaskPool *__restrict pool, void *task_data_v, int UNUSED(thread_id))
|
||||
{
|
||||
OGLRender *oglrender = (OGLRender *)BLI_task_pool_userdata(pool);
|
||||
OGLRender *oglrender = (OGLRender *)BLI_task_pool_user_data(pool);
|
||||
WriteTaskData *task_data = (WriteTaskData *)task_data_v;
|
||||
Scene *scene = &task_data->tmp_scene;
|
||||
RenderResult *rr = task_data->rr;
|
||||
|
|
|
@ -887,7 +887,7 @@ static uchar *prefetch_thread_next_frame(PrefetchQueue *queue,
|
|||
|
||||
static void prefetch_task_func(TaskPool *__restrict pool, void *task_data, int UNUSED(threadid))
|
||||
{
|
||||
PrefetchQueue *queue = (PrefetchQueue *)BLI_task_pool_userdata(pool);
|
||||
PrefetchQueue *queue = (PrefetchQueue *)BLI_task_pool_user_data(pool);
|
||||
MovieClip *clip = (MovieClip *)task_data;
|
||||
uchar *mem;
|
||||
size_t size;
|
||||
|
|
|
@ -1370,7 +1370,7 @@ static uchar *proxy_thread_next_frame(ProxyQueue *queue,
|
|||
static void proxy_task_func(TaskPool *__restrict pool, void *task_data, int UNUSED(threadid))
|
||||
{
|
||||
ProxyThread *data = (ProxyThread *)task_data;
|
||||
ProxyQueue *queue = (ProxyQueue *)BLI_task_pool_userdata(pool);
|
||||
ProxyQueue *queue = (ProxyQueue *)BLI_task_pool_user_data(pool);
|
||||
uchar *mem;
|
||||
size_t size;
|
||||
int cfra;
|
||||
|
|
|
@ -1268,7 +1268,7 @@ static void filelist_cache_preview_runf(TaskPool *__restrict pool,
|
|||
void *taskdata,
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
FileListEntryCache *cache = BLI_task_pool_userdata(pool);
|
||||
FileListEntryCache *cache = BLI_task_pool_user_data(pool);
|
||||
FileListEntryPreviewTaskData *preview_taskdata = taskdata;
|
||||
FileListEntryPreview *preview = preview_taskdata->preview;
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ void nearest_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, in
|
|||
|
||||
static void processor_apply_func(TaskPool *__restrict pool, void *taskdata, int UNUSED(threadid))
|
||||
{
|
||||
void (*do_thread)(void *) = (void (*)(void *))BLI_task_pool_userdata(pool);
|
||||
void (*do_thread)(void *) = (void (*)(void *))BLI_task_pool_user_data(pool);
|
||||
do_thread(taskdata);
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ static void processor_apply_scanline_func(TaskPool *__restrict pool,
|
|||
void *taskdata,
|
||||
int UNUSED(threadid))
|
||||
{
|
||||
ScanlineGlobalData *data = BLI_task_pool_userdata(pool);
|
||||
ScanlineGlobalData *data = BLI_task_pool_user_data(pool);
|
||||
int start_scanline = POINTER_AS_INT(taskdata);
|
||||
int num_scanlines = min_ii(data->scanlines_per_task, data->total_scanlines - start_scanline);
|
||||
data->do_thread(data->custom_data, start_scanline, num_scanlines);
|
||||
|
|
|
@ -65,7 +65,7 @@ struct IndexedNode {
|
|||
|
||||
void concurrent_insert(TaskPool *__restrict pool, void *taskdata, int /*threadid*/)
|
||||
{
|
||||
LockfreeLinkList *list = (LockfreeLinkList *)BLI_task_pool_userdata(pool);
|
||||
LockfreeLinkList *list = (LockfreeLinkList *)BLI_task_pool_user_data(pool);
|
||||
CHECK_NOTNULL(list);
|
||||
IndexedNode *node = (IndexedNode *)MEM_mallocN(sizeof(IndexedNode), "test node");
|
||||
node->index = POINTER_AS_INT(taskdata);
|
||||
|
|
Loading…
Reference in New Issue