Example #1
0
        internal static unsafe JobHandle ScheduleInternal_3 <T>(ref T jobData, ComponentSystemBase system,
                                                                int innerloopBatchCount, JobHandle dependsOn, ScheduleMode mode)
            where T : struct
        {
            JobStruct_ProcessInfer_3 <T> fullData;

            fullData.Data = jobData;

            var isParallelFor = innerloopBatchCount != -1;

            IJobProcessComponentDataUtility.Initialize(system, typeof(T), typeof(JobStruct_Process3 <, , ,>),
                                                       isParallelFor, ref JobStruct_ProcessInfer_3 <T> .Cache, out fullData.Iterator);
            return(Schedule(UnsafeUtility.AddressOf(ref fullData), fullData.Iterator.m_Length, innerloopBatchCount,
                            isParallelFor, ref JobStruct_ProcessInfer_3 <T> .Cache, dependsOn, mode));
        }
Example #2
0
        internal unsafe static JobHandle ScheduleInternal_3 <T>(ref T jobData, ComponentSystemBase system, int innerloopBatchCount, JobHandle dependsOn, ScheduleMode mode)
            where T : struct
        {
            JobStruct_ProcessInfer_3 <T> fullData;

            fullData.Data = jobData;

            bool isParallelFor = innerloopBatchCount != -1;

            IJobProcessComponentDataUtility.Initialize(system, typeof(T), typeof(JobStruct_Process3 <, , ,>), isParallelFor, ref JobStruct_ProcessInfer_3 <T> .Cache, out fullData.Iterator);

            if (isParallelFor)
            {
                var length         = fullData.Iterator.m_Length;
                var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref fullData), JobStruct_ProcessInfer_3 <T> .Cache.JobReflectionDataParallelFor, dependsOn, mode);
                return(JobsUtility.ScheduleParallelFor(ref scheduleParams, length, innerloopBatchCount));
            }
            else
            {
                var scheduleParams = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref fullData), JobStruct_ProcessInfer_3 <T> .Cache.JobReflectionData, dependsOn, mode);
                return(JobsUtility.Schedule(ref scheduleParams));
            }
        }