/// <summary>
        /// Schedule jobs to collect and sort shared values.
        /// </summary>
        /// <param name="inputDeps">Dependent JobHandle</param>
        /// <returns>JobHandle</returns>
        public JobHandle Schedule(JobHandle inputDeps)
        {
            if (m_Source.Length <= 1)
            {
                return(inputDeps);
            }
            var initializeIndicesJob = new InitializeIndices
            {
                buffer = m_Buffer
            };
            var initializeIndicesJobHandle = initializeIndicesJob.Schedule(m_Source.Length, (m_Source.Length + 1) / 8, inputDeps);
            var sortJobHandle = Sort(initializeIndicesJobHandle);
            var resolveSharedGroupsJobHandle = ResolveSharedGroups(sortJobHandle);

            return(resolveSharedGroupsJobHandle);
        }
Example #2
0
        public JobHandle Schedule(JobHandle inputDeps)
        {
            JobHandle handle4;

            if (this.m_Source.Length <= 1)
            {
                handle4 = inputDeps;
            }
            else
            {
                JobHandle handle = new InitializeIndices <T> {
                    buffer = this.m_Buffer
                }.Schedule <InitializeIndices <T> >(this.m_Source.Length, (this.m_Source.Length + 1) / 8, inputDeps);
                JobHandle handle2 = this.Sort(handle);
                handle4 = this.ResolveSharedGroups(handle2);
            }
            return(handle4);
        }
        /// <summary>
        ///     Schedule jobs to collect and sort shared values.
        /// </summary>
        /// <param name="inputDeps">Dependent JobHandle</param>
        /// <returns>JobHandle</returns>
        public JobHandle Schedule(JobHandle inputDeps)
        {
            if (m_SourceBuffer.Length == 0)
            {
                m_WorkingBuffer[0] = 0;
                return(inputDeps);
            }

            var initializeIndicesJob = new InitializeIndices
            {
                workingBuffer = m_WorkingBuffer
            };
            var initializeIndicesJobHandle =
                initializeIndicesJob.Schedule(m_SourceBuffer.Length, (m_SourceBuffer.Length + 1) / 8, inputDeps);
            var sortJobHandle = Sort(initializeIndicesJobHandle);
            var resolveSharedGroupsJobHandle = ResolveSharedGroups(sortJobHandle);

            return(resolveSharedGroupsJobHandle);
        }