• Home
  • Raw
  • Download

Lines Matching refs:mtls

526 bool RsdCpuScriptImpl::setUpMtlsDimensions(MTLaunchStructCommon *mtls,  in setUpMtlsDimensions()  argument
529 rsAssert(mtls); in setUpMtlsDimensions()
533 mtls->end.DIM_FIELD = baseDim.DIM_FIELD; \ in setUpMtlsDimensions()
535 mtls->start.DIM_FIELD = \ in setUpMtlsDimensions()
537 mtls->end.DIM_FIELD = \ in setUpMtlsDimensions()
539 if (mtls->start.DIM_FIELD >= mtls->end.DIM_FIELD) { \ in setUpMtlsDimensions()
562 MTLaunchStructReduce *mtls) { in reduceMtlsSetup() argument
564 memset(mtls, 0, sizeof(MTLaunchStructReduce)); in reduceMtlsSetup()
565 mtls->dimPtr = &mtls->redp.dim; in reduceMtlsSetup()
584 mtls->redp.dim.x = inType->getDimX(); in reduceMtlsSetup()
585 mtls->redp.dim.y = inType->getDimY(); in reduceMtlsSetup()
586 mtls->redp.dim.z = inType->getDimZ(); in reduceMtlsSetup()
597 if (!setUpMtlsDimensions(mtls, mtls->redp.dim, sc)) { in reduceMtlsSetup()
602 mtls->end.x = rsMax((uint32_t)1, mtls->end.x); in reduceMtlsSetup()
603 mtls->end.y = rsMax((uint32_t)1, mtls->end.y); in reduceMtlsSetup()
605 mtls->rs = mCtx; in reduceMtlsSetup()
607 mtls->mSliceNum = 0; in reduceMtlsSetup()
608 mtls->mSliceSize = 1; in reduceMtlsSetup()
609 mtls->isThreadable = mIsThreadable; in reduceMtlsSetup()
612 mtls->redp.outLen = 1; in reduceMtlsSetup()
613 mtls->redp.outPtr[0] = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr; in reduceMtlsSetup()
614 mtls->redp.outStride[0] = aout->getType()->getElementSizeBytes(); in reduceMtlsSetup()
617 memcpy(mtls->ains, ains, inLen * sizeof(ains[0])); in reduceMtlsSetup()
618 mtls->redp.inLen = inLen; in reduceMtlsSetup()
620 mtls->redp.inPtr[index] = (const uint8_t*)ains[index]->mHal.drvState.lod[0].mallocPtr; in reduceMtlsSetup()
621 mtls->redp.inStride[index] = ains[index]->getType()->getElementSizeBytes(); in reduceMtlsSetup()
634 MTLaunchStructForEach *mtls) { in forEachMtlsSetup() argument
641 memset(mtls, 0, sizeof(MTLaunchStructForEach)); in forEachMtlsSetup()
642 mtls->dimPtr = &mtls->fep.dim; in forEachMtlsSetup()
662 mtls->fep.dim.x = inType->getDimX(); in forEachMtlsSetup()
663 mtls->fep.dim.y = inType->getDimY(); in forEachMtlsSetup()
664 mtls->fep.dim.z = inType->getDimZ(); in forEachMtlsSetup()
677 mtls->fep.dim.x = outType->getDimX(); in forEachMtlsSetup()
678 mtls->fep.dim.y = outType->getDimY(); in forEachMtlsSetup()
679 mtls->fep.dim.z = outType->getDimZ(); in forEachMtlsSetup()
682 mtls->fep.dim.x = sc->xEnd; in forEachMtlsSetup()
683 mtls->fep.dim.y = sc->yEnd; in forEachMtlsSetup()
684 mtls->fep.dim.z = 0; in forEachMtlsSetup()
700 if (!setUpMtlsDimensions(mtls, mtls->fep.dim, sc)) { in forEachMtlsSetup()
705 mtls->end.x = rsMax((uint32_t)1, mtls->end.x); in forEachMtlsSetup()
706 mtls->end.y = rsMax((uint32_t)1, mtls->end.y); in forEachMtlsSetup()
707 mtls->rs = mCtx; in forEachMtlsSetup()
709 memcpy(mtls->ains, ains, inLen * sizeof(ains[0])); in forEachMtlsSetup()
711 mtls->aout[0] = aout; in forEachMtlsSetup()
712 mtls->fep.usr = usr; in forEachMtlsSetup()
713 mtls->fep.usrLen = usrLen; in forEachMtlsSetup()
714 mtls->mSliceSize = 1; in forEachMtlsSetup()
715 mtls->mSliceNum = 0; in forEachMtlsSetup()
717 mtls->isThreadable = mIsThreadable; in forEachMtlsSetup()
720 mtls->fep.inLen = inLen; in forEachMtlsSetup()
722 mtls->fep.inPtr[index] = (const uint8_t*)ains[index]->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
723 mtls->fep.inStride[index] = ains[index]->getType()->getElementSizeBytes(); in forEachMtlsSetup()
728 mtls->fep.outPtr[0] = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
729 mtls->fep.outStride[0] = aout->getType()->getElementSizeBytes(); in forEachMtlsSetup()
745 MTLaunchStructForEach mtls; in invokeForEach() local
747 if (forEachMtlsSetup(ains, inLen, aout, usr, usrLen, sc, &mtls)) { in invokeForEach()
748 forEachKernelSetup(slot, &mtls); in invokeForEach()
751 mCtx->launchForEach(ains, inLen, aout, sc, &mtls); in invokeForEach()
760 MTLaunchStructReduce mtls; in invokeReduce() local
762 if (reduceMtlsSetup(ains, inLen, aout, sc, &mtls)) { in invokeReduce()
763 reduceKernelSetup(slot, &mtls); in invokeReduce()
765 mCtx->launchReduce(ains, inLen, aout, &mtls); in invokeReduce()
770 void RsdCpuScriptImpl::forEachKernelSetup(uint32_t slot, MTLaunchStructForEach *mtls) { in forEachKernelSetup() argument
771 mtls->script = this; in forEachKernelSetup()
772 mtls->fep.slot = slot; in forEachKernelSetup()
773 mtls->kernel = mScriptExec->getForEachFunction(slot); in forEachKernelSetup()
774 rsAssert(mtls->kernel != nullptr); in forEachKernelSetup()
777 void RsdCpuScriptImpl::reduceKernelSetup(uint32_t slot, MTLaunchStructReduce *mtls) { in reduceKernelSetup() argument
778 mtls->script = this; in reduceKernelSetup()
779 mtls->redp.slot = slot; in reduceKernelSetup()
782 mtls->accumFunc = desc->accumFunc; in reduceKernelSetup()
783 mtls->initFunc = desc->initFunc; // might legally be nullptr in reduceKernelSetup()
784 mtls->combFunc = desc->combFunc; // might legally be nullptr in reduceKernelSetup()
785 mtls->outFunc = desc->outFunc; // might legally be nullptr in reduceKernelSetup()
786 mtls->accumSize = desc->accumSize; in reduceKernelSetup()
788 rsAssert(mtls->accumFunc != nullptr); in reduceKernelSetup()