Lines Matching refs:mtls
795 MTLaunchStruct *mtls) { in forEachMtlsSetup() argument
797 memset(mtls, 0, sizeof(MTLaunchStruct)); in forEachMtlsSetup()
812 mtls->fep.dimX = inType->getDimX(); in forEachMtlsSetup()
813 mtls->fep.dimY = inType->getDimY(); in forEachMtlsSetup()
814 mtls->fep.dimZ = inType->getDimZ(); in forEachMtlsSetup()
819 mtls->fep.dimX = outType->getDimX(); in forEachMtlsSetup()
820 mtls->fep.dimY = outType->getDimY(); in forEachMtlsSetup()
821 mtls->fep.dimZ = outType->getDimZ(); in forEachMtlsSetup()
838 mtls->xEnd = mtls->fep.dimX; in forEachMtlsSetup()
840 rsAssert(sc->xStart < mtls->fep.dimX); in forEachMtlsSetup()
841 rsAssert(sc->xEnd <= mtls->fep.dimX); in forEachMtlsSetup()
843 mtls->xStart = rsMin(mtls->fep.dimX, sc->xStart); in forEachMtlsSetup()
844 mtls->xEnd = rsMin(mtls->fep.dimX, sc->xEnd); in forEachMtlsSetup()
845 if (mtls->xStart >= mtls->xEnd) return; in forEachMtlsSetup()
849 mtls->yEnd = mtls->fep.dimY; in forEachMtlsSetup()
851 rsAssert(sc->yStart < mtls->fep.dimY); in forEachMtlsSetup()
852 rsAssert(sc->yEnd <= mtls->fep.dimY); in forEachMtlsSetup()
854 mtls->yStart = rsMin(mtls->fep.dimY, sc->yStart); in forEachMtlsSetup()
855 mtls->yEnd = rsMin(mtls->fep.dimY, sc->yEnd); in forEachMtlsSetup()
856 if (mtls->yStart >= mtls->yEnd) return; in forEachMtlsSetup()
860 mtls->zEnd = mtls->fep.dimZ; in forEachMtlsSetup()
862 rsAssert(sc->zStart < mtls->fep.dimZ); in forEachMtlsSetup()
863 rsAssert(sc->zEnd <= mtls->fep.dimZ); in forEachMtlsSetup()
865 mtls->zStart = rsMin(mtls->fep.dimZ, sc->zStart); in forEachMtlsSetup()
866 mtls->zEnd = rsMin(mtls->fep.dimZ, sc->zEnd); in forEachMtlsSetup()
867 if (mtls->zStart >= mtls->zEnd) return; in forEachMtlsSetup()
870 mtls->xEnd = rsMax((uint32_t)1, mtls->xEnd); in forEachMtlsSetup()
871 mtls->yEnd = rsMax((uint32_t)1, mtls->yEnd); in forEachMtlsSetup()
872 mtls->zEnd = rsMax((uint32_t)1, mtls->zEnd); in forEachMtlsSetup()
873 mtls->arrayEnd = rsMax((uint32_t)1, mtls->arrayEnd); in forEachMtlsSetup()
877 mtls->rsc = mCtx; in forEachMtlsSetup()
878 mtls->ain = ain; in forEachMtlsSetup()
879 mtls->aout = aout; in forEachMtlsSetup()
880 mtls->fep.usr = usr; in forEachMtlsSetup()
881 mtls->fep.usrLen = usrLen; in forEachMtlsSetup()
882 mtls->mSliceSize = 1; in forEachMtlsSetup()
883 mtls->mSliceNum = 0; in forEachMtlsSetup()
885 mtls->fep.ptrIn = NULL; in forEachMtlsSetup()
886 mtls->fep.eStrideIn = 0; in forEachMtlsSetup()
887 mtls->isThreadable = mIsThreadable; in forEachMtlsSetup()
890 mtls->fep.ptrIn = (const uint8_t *)ain->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
891 mtls->fep.eStrideIn = ain->getType()->getElementSizeBytes(); in forEachMtlsSetup()
892 mtls->fep.yStrideIn = ain->mHal.drvState.lod[0].stride; in forEachMtlsSetup()
895 mtls->fep.ptrOut = NULL; in forEachMtlsSetup()
896 mtls->fep.eStrideOut = 0; in forEachMtlsSetup()
898 mtls->fep.ptrOut = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
899 mtls->fep.eStrideOut = aout->getType()->getElementSizeBytes(); in forEachMtlsSetup()
900 mtls->fep.yStrideOut = aout->mHal.drvState.lod[0].stride; in forEachMtlsSetup()
908 MTLaunchStruct *mtls) { in forEachMtlsSetup() argument
910 memset(mtls, 0, sizeof(MTLaunchStruct)); in forEachMtlsSetup()
933 mtls->fep.dimX = inType->getDimX(); in forEachMtlsSetup()
934 mtls->fep.dimY = inType->getDimY(); in forEachMtlsSetup()
935 mtls->fep.dimZ = inType->getDimZ(); in forEachMtlsSetup()
949 mtls->fep.dimX = outType->getDimX(); in forEachMtlsSetup()
950 mtls->fep.dimY = outType->getDimY(); in forEachMtlsSetup()
951 mtls->fep.dimZ = outType->getDimZ(); in forEachMtlsSetup()
968 mtls->xEnd = mtls->fep.dimX; in forEachMtlsSetup()
970 rsAssert(sc->xStart < mtls->fep.dimX); in forEachMtlsSetup()
971 rsAssert(sc->xEnd <= mtls->fep.dimX); in forEachMtlsSetup()
973 mtls->xStart = rsMin(mtls->fep.dimX, sc->xStart); in forEachMtlsSetup()
974 mtls->xEnd = rsMin(mtls->fep.dimX, sc->xEnd); in forEachMtlsSetup()
975 if (mtls->xStart >= mtls->xEnd) return; in forEachMtlsSetup()
979 mtls->yEnd = mtls->fep.dimY; in forEachMtlsSetup()
981 rsAssert(sc->yStart < mtls->fep.dimY); in forEachMtlsSetup()
982 rsAssert(sc->yEnd <= mtls->fep.dimY); in forEachMtlsSetup()
984 mtls->yStart = rsMin(mtls->fep.dimY, sc->yStart); in forEachMtlsSetup()
985 mtls->yEnd = rsMin(mtls->fep.dimY, sc->yEnd); in forEachMtlsSetup()
986 if (mtls->yStart >= mtls->yEnd) return; in forEachMtlsSetup()
990 mtls->zEnd = mtls->fep.dimZ; in forEachMtlsSetup()
992 rsAssert(sc->zStart < mtls->fep.dimZ); in forEachMtlsSetup()
993 rsAssert(sc->zEnd <= mtls->fep.dimZ); in forEachMtlsSetup()
995 mtls->zStart = rsMin(mtls->fep.dimZ, sc->zStart); in forEachMtlsSetup()
996 mtls->zEnd = rsMin(mtls->fep.dimZ, sc->zEnd); in forEachMtlsSetup()
997 if (mtls->zStart >= mtls->zEnd) return; in forEachMtlsSetup()
1000 mtls->xEnd = rsMax((uint32_t)1, mtls->xEnd); in forEachMtlsSetup()
1001 mtls->yEnd = rsMax((uint32_t)1, mtls->yEnd); in forEachMtlsSetup()
1002 mtls->zEnd = rsMax((uint32_t)1, mtls->zEnd); in forEachMtlsSetup()
1003 mtls->arrayEnd = rsMax((uint32_t)1, mtls->arrayEnd); in forEachMtlsSetup()
1007 mtls->rsc = mCtx; in forEachMtlsSetup()
1008 mtls->ains = ains; in forEachMtlsSetup()
1009 mtls->aout = aout; in forEachMtlsSetup()
1010 mtls->fep.usr = usr; in forEachMtlsSetup()
1011 mtls->fep.usrLen = usrLen; in forEachMtlsSetup()
1012 mtls->mSliceSize = 1; in forEachMtlsSetup()
1013 mtls->mSliceNum = 0; in forEachMtlsSetup()
1015 mtls->fep.ptrIns = NULL; in forEachMtlsSetup()
1016 mtls->fep.eStrideIn = 0; in forEachMtlsSetup()
1017 mtls->isThreadable = mIsThreadable; in forEachMtlsSetup()
1020 mtls->fep.ptrIns = new const uint8_t*[inLen]; in forEachMtlsSetup()
1021 mtls->fep.inStrides = new StridePair[inLen]; in forEachMtlsSetup()
1026 mtls->fep.ptrIns[index] = in forEachMtlsSetup()
1029 mtls->fep.inStrides[index].eStride = in forEachMtlsSetup()
1031 mtls->fep.inStrides[index].yStride = in forEachMtlsSetup()
1036 mtls->fep.ptrOut = NULL; in forEachMtlsSetup()
1037 mtls->fep.eStrideOut = 0; in forEachMtlsSetup()
1039 mtls->fep.ptrOut = (uint8_t *)aout->mHal.drvState.lod[0].mallocPtr; in forEachMtlsSetup()
1040 mtls->fep.eStrideOut = aout->getType()->getElementSizeBytes(); in forEachMtlsSetup()
1041 mtls->fep.yStrideOut = aout->mHal.drvState.lod[0].stride; in forEachMtlsSetup()
1053 MTLaunchStruct mtls; in invokeForEach() local
1054 forEachMtlsSetup(ain, aout, usr, usrLen, sc, &mtls); in invokeForEach()
1055 forEachKernelSetup(slot, &mtls); in invokeForEach()
1058 mCtx->launchThreads(ain, aout, sc, &mtls); in invokeForEach()
1070 MTLaunchStruct mtls; in invokeForEachMulti() local
1072 forEachMtlsSetup(ains, inLen, aout, usr, usrLen, sc, &mtls); in invokeForEachMulti()
1073 forEachKernelSetup(slot, &mtls); in invokeForEachMulti()
1076 mCtx->launchThreads(ains, inLen, aout, sc, &mtls); in invokeForEachMulti()
1080 void RsdCpuScriptImpl::forEachKernelSetup(uint32_t slot, MTLaunchStruct *mtls) { in forEachKernelSetup() argument
1081 mtls->script = this; in forEachKernelSetup()
1082 mtls->fep.slot = slot; in forEachKernelSetup()
1085 mtls->kernel = reinterpret_cast<ForEachFunc_t>( in forEachKernelSetup()
1087 rsAssert(mtls->kernel != NULL); in forEachKernelSetup()
1088 mtls->sig = mExecutable->getInfo().getExportForeachFuncs()[slot].second; in forEachKernelSetup()
1090 mtls->kernel = reinterpret_cast<ForEachFunc_t>(mForEachFunctions[slot]); in forEachKernelSetup()
1091 rsAssert(mtls->kernel != NULL); in forEachKernelSetup()
1092 mtls->sig = mForEachSignatures[slot]; in forEachKernelSetup()