Home | History | Annotate | Download | only in cpu_ref

Lines Matching defs:mtls

746                                         MTLaunchStruct *mtls) {
748 memset(mtls, 0, sizeof(MTLaunchStruct));
761 mtls->fep.dimX = ain->getType()->getDimX();
762 mtls->fep.dimY = ain->getType()->getDimY();
763 mtls->fep.dimZ = ain->getType()->getDimZ();
764 //mtls->dimArray = ain->getType()->getDimArray();
766 mtls->fep.dimX = aout->getType()->getDimX();
767 mtls->fep.dimY = aout->getType()->getDimY();
768 mtls->fep.dimZ = aout->getType()->getDimZ();
769 //mtls->dimArray = aout->getType()->getDimArray();
776 mtls->xEnd = mtls->fep.dimX;
778 rsAssert(sc->xStart < mtls->fep.dimX);
779 rsAssert(sc->xEnd <= mtls->fep.dimX);
781 mtls->xStart = rsMin(mtls->fep.dimX, sc->xStart);
782 mtls->xEnd = rsMin(mtls->fep.dimX, sc->xEnd);
783 if (mtls->xStart >= mtls->xEnd) return;
787 mtls->yEnd = mtls->fep.dimY;
789 rsAssert(sc->yStart < mtls->fep.dimY);
790 rsAssert(sc->yEnd <= mtls->fep.dimY);
792 mtls->yStart = rsMin(mtls->fep.dimY, sc->yStart);
793 mtls->yEnd = rsMin(mtls->fep.dimY, sc->yEnd);
794 if (mtls->yStart >= mtls->yEnd) return;
798 mtls->zEnd = mtls->fep.dimZ;
800 rsAssert(sc->zStart < mtls->fep.dimZ);
801 rsAssert(sc->zEnd <= mtls->fep.dimZ);
803 mtls->zStart = rsMin(mtls->fep.dimZ, sc->zStart);
804 mtls->zEnd = rsMin(mtls->fep.dimZ, sc->zEnd);
805 if (mtls->zStart >= mtls->zEnd) return;
808 mtls->xEnd = rsMax((uint32_t)1, mtls->xEnd);
809 mtls->yEnd = rsMax((uint32_t)1, mtls->yEnd);
810 mtls->zEnd = rsMax((uint32_t)1, mtls->zEnd);
811 mtls->arrayEnd = rsMax((uint32_t)1, mtls->arrayEnd);
815 mtls->rsc = mCtx;
816 mtls->ain = ain;
817 mtls->aout = aout;
818 mtls->fep.usr = usr;
819 mtls->fep.usrLen = usrLen;
820 mtls->mSliceSize = 1;
821 mtls->mSliceNum = 0;
823 mtls->fep.ptrIn = NULL;
824 mtls->fep.eStrideIn = 0;
825 mtls->isThreadable = mIsThreadable;
828 mtls->fep.ptrIn = (const uint8_t *)ain->mHal.drvState.lod[0].mallocPtr;
829 mtls->fep.eStrideIn = ain->getType()->getElementSizeBytes();
830 mtls->fep.yStrideIn = ain->mHal.drvState.lod[0].stride;
833 mtls->fep.ptrOut = NULL;
834 mtls->fep.eStrideOut = 0;
836 mtls->fep.ptrOut = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr;
837 mtls->fep.eStrideOut = aout->getType()->getElementSizeBytes();
838 mtls->fep.yStrideOut = aout->mHal.drvState.lod[0].stride;
850 MTLaunchStruct mtls;
851 forEachMtlsSetup(ain, aout, usr, usrLen, sc, &mtls);
852 forEachKernelSetup(slot, &mtls);
855 mCtx->launchThreads(ain, aout, sc, &mtls);
859 void RsdCpuScriptImpl::forEachKernelSetup(uint32_t slot, MTLaunchStruct *mtls) {
860 mtls->script = this;
861 mtls->fep.slot = slot;
864 mtls->kernel = reinterpret_cast<ForEachFunc_t>(
866 rsAssert(mtls->kernel != NULL);
867 mtls->sig = mExecutable->getInfo().getExportForeachFuncs()[slot].second;
869 mtls->kernel = reinterpret_cast<ForEachFunc_t>(mForEachFunctions[slot]);
870 rsAssert(mtls->kernel != NULL);
871 mtls->sig = mForEachSignatures[slot];