• Home
  • Raw
  • Download

Lines Matching refs:mtls

523 bool RsdCpuScriptImpl::setUpMtlsDimensions(MTLaunchStructCommon *mtls,  in setUpMtlsDimensions()  argument
526 rsAssert(mtls); in setUpMtlsDimensions()
530 mtls->end.DIM_FIELD = baseDim.DIM_FIELD; \ in setUpMtlsDimensions()
532 mtls->start.DIM_FIELD = \ in setUpMtlsDimensions()
534 mtls->end.DIM_FIELD = \ in setUpMtlsDimensions()
536 if (mtls->start.DIM_FIELD >= mtls->end.DIM_FIELD) { \ in setUpMtlsDimensions()
559 MTLaunchStructReduce *mtls) { in reduceMtlsSetup() argument
561 memset(mtls, 0, sizeof(MTLaunchStructReduce)); in reduceMtlsSetup()
562 mtls->dimPtr = &mtls->redp.dim; in reduceMtlsSetup()
581 mtls->redp.dim.x = inType->getDimX(); in reduceMtlsSetup()
582 mtls->redp.dim.y = inType->getDimY(); in reduceMtlsSetup()
583 mtls->redp.dim.z = inType->getDimZ(); in reduceMtlsSetup()
594 if (!setUpMtlsDimensions(mtls, mtls->redp.dim, sc)) { in reduceMtlsSetup()
599 mtls->end.x = rsMax((uint32_t)1, mtls->end.x); in reduceMtlsSetup()
600 mtls->end.y = rsMax((uint32_t)1, mtls->end.y); in reduceMtlsSetup()
602 mtls->rs = mCtx; in reduceMtlsSetup()
604 mtls->mSliceNum = 0; in reduceMtlsSetup()
605 mtls->mSliceSize = 1; in reduceMtlsSetup()
606 mtls->isThreadable = mIsThreadable; in reduceMtlsSetup()
609 mtls->redp.outLen = 1; in reduceMtlsSetup()
610 mtls->redp.outPtr[0] = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr; in reduceMtlsSetup()
611 mtls->redp.outStride[0] = aout->getType()->getElementSizeBytes(); in reduceMtlsSetup()
614 memcpy(mtls->ains, ains, inLen * sizeof(ains[0])); in reduceMtlsSetup()
615 mtls->redp.inLen = inLen; in reduceMtlsSetup()
617 mtls->redp.inPtr[index] = (const uint8_t*)ains[index]->mHal.drvState.lod[0].mallocPtr; in reduceMtlsSetup()
618 mtls->redp.inStride[index] = ains[index]->getType()->getElementSizeBytes(); in reduceMtlsSetup()
631 MTLaunchStructForEach *mtls) { in forEachMtlsSetup() argument
638 memset(mtls, 0, sizeof(MTLaunchStructForEach)); in forEachMtlsSetup()
639 mtls->dimPtr = &mtls->fep.dim; in forEachMtlsSetup()
665 mtls->fep.dim.x = inType->getDimX(); in forEachMtlsSetup()
666 mtls->fep.dim.y = inType->getDimY(); in forEachMtlsSetup()
667 mtls->fep.dim.z = inType->getDimZ(); in forEachMtlsSetup()
680 mtls->fep.dim.x = outType->getDimX(); in forEachMtlsSetup()
681 mtls->fep.dim.y = outType->getDimY(); in forEachMtlsSetup()
682 mtls->fep.dim.z = outType->getDimZ(); in forEachMtlsSetup()
685 mtls->fep.dim.x = sc->xEnd; in forEachMtlsSetup()
686 mtls->fep.dim.y = sc->yEnd; in forEachMtlsSetup()
687 mtls->fep.dim.z = 0; in forEachMtlsSetup()
703 if (!setUpMtlsDimensions(mtls, mtls->fep.dim, sc)) { in forEachMtlsSetup()
708 mtls->end.x = rsMax((uint32_t)1, mtls->end.x); in forEachMtlsSetup()
709 mtls->end.y = rsMax((uint32_t)1, mtls->end.y); in forEachMtlsSetup()
710 mtls->rs = mCtx; in forEachMtlsSetup()
712 memcpy(mtls->ains, ains, inLen * sizeof(ains[0])); in forEachMtlsSetup()
714 mtls->aout[0] = aout; in forEachMtlsSetup()
715 mtls->fep.usr = usr; in forEachMtlsSetup()
716 mtls->fep.usrLen = usrLen; in forEachMtlsSetup()
717 mtls->mSliceSize = 1; in forEachMtlsSetup()
718 mtls->mSliceNum = 0; in forEachMtlsSetup()
720 mtls->isThreadable = mIsThreadable; in forEachMtlsSetup()
723 mtls->fep.inLen = inLen; in forEachMtlsSetup()
731 mtls->fep.inPtr[index] = (const uint8_t*)ains[index]->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
732 mtls->fep.inStride[index] = ains[index]->getType()->getElementSizeBytes(); in forEachMtlsSetup()
737 mtls->fep.outPtr[0] = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
738 mtls->fep.outStride[0] = aout->getType()->getElementSizeBytes(); in forEachMtlsSetup()
754 MTLaunchStructForEach mtls; in invokeForEach() local
756 if (forEachMtlsSetup(ains, inLen, aout, usr, usrLen, sc, &mtls)) { in invokeForEach()
757 forEachKernelSetup(slot, &mtls); in invokeForEach()
760 mCtx->launchForEach(ains, inLen, aout, sc, &mtls); in invokeForEach()
769 MTLaunchStructReduce mtls; in invokeReduce() local
771 if (reduceMtlsSetup(ains, inLen, aout, sc, &mtls)) { in invokeReduce()
772 reduceKernelSetup(slot, &mtls); in invokeReduce()
774 mCtx->launchReduce(ains, inLen, aout, &mtls); in invokeReduce()
779 void RsdCpuScriptImpl::forEachKernelSetup(uint32_t slot, MTLaunchStructForEach *mtls) { in forEachKernelSetup() argument
780 mtls->script = this; in forEachKernelSetup()
781 mtls->fep.slot = slot; in forEachKernelSetup()
782 mtls->kernel = mScriptExec->getForEachFunction(slot); in forEachKernelSetup()
783 rsAssert(mtls->kernel != nullptr); in forEachKernelSetup()
786 void RsdCpuScriptImpl::reduceKernelSetup(uint32_t slot, MTLaunchStructReduce *mtls) { in reduceKernelSetup() argument
787 mtls->script = this; in reduceKernelSetup()
788 mtls->redp.slot = slot; in reduceKernelSetup()
791 mtls->accumFunc = desc->accumFunc; in reduceKernelSetup()
792 mtls->initFunc = desc->initFunc; // might legally be nullptr in reduceKernelSetup()
793 mtls->combFunc = desc->combFunc; // might legally be nullptr in reduceKernelSetup()
794 mtls->outFunc = desc->outFunc; // might legally be nullptr in reduceKernelSetup()
795 mtls->accumSize = desc->accumSize; in reduceKernelSetup()
797 rsAssert(mtls->accumFunc != nullptr); in reduceKernelSetup()