Lines Matching refs:nbJobs
834 static void ZSTDMT_freeJobsTable(ZSTDMT_jobDescription* jobTable, U32 nbJobs, ZSTD_customMem cMem) in ZSTDMT_freeJobsTable() argument
838 for (jobNb=0; jobNb<nbJobs; jobNb++) { in ZSTDMT_freeJobsTable()
851 U32 const nbJobs = 1 << nbJobsLog2; in ZSTDMT_createJobsTable() local
854 ZSTD_customCalloc(nbJobs * sizeof(ZSTDMT_jobDescription), cMem); in ZSTDMT_createJobsTable()
857 *nbJobsPtr = nbJobs; in ZSTDMT_createJobsTable()
858 for (jobNb=0; jobNb<nbJobs; jobNb++) { in ZSTDMT_createJobsTable()
863 ZSTDMT_freeJobsTable(jobTable, nbJobs, cMem); in ZSTDMT_createJobsTable()
870 U32 nbJobs = nbWorkers + 2; in ZSTDMT_expandJobsTable() local
871 if (nbJobs > mtctx->jobIDMask+1) { /* need more job capacity */ in ZSTDMT_expandJobsTable()
874 mtctx->jobs = ZSTDMT_createJobsTable(&nbJobs, mtctx->cMem); in ZSTDMT_expandJobsTable()
876 … assert((nbJobs != 0) && ((nbJobs & (nbJobs - 1)) == 0)); /* ensure nbJobs is a power of 2 */ in ZSTDMT_expandJobsTable()
877 mtctx->jobIDMask = nbJobs - 1; in ZSTDMT_expandJobsTable()
893 U32 nbJobs = nbWorkers + 2; in ZSTDMT_createCCtx_advanced_internal() local
916 mtctx->jobs = ZSTDMT_createJobsTable(&nbJobs, cMem); in ZSTDMT_createCCtx_advanced_internal()
917 assert(nbJobs > 0); assert((nbJobs & (nbJobs - 1)) == 0); /* ensure nbJobs is a power of 2 */ in ZSTDMT_createCCtx_advanced_internal()
918 mtctx->jobIDMask = nbJobs - 1; in ZSTDMT_createCCtx_advanced_internal()