Пример #1
0
        public override int GetHashCode()
        {
            var hashCode = -824568562;

            hashCode = hashCode * -1521134295 + GlobalWorkOffset.GetHashCode();
            hashCode = hashCode * -1521134295 + GlobalWorkSize.GetHashCode();
            hashCode = hashCode * -1521134295 + LocalWorkSize.GetHashCode();
            return(hashCode);
        }
Пример #2
0
        /// <summary>
        /// Calculate number of words to fit complete instruction bytecode.
        /// </summary>
        /// <returns>Number of words in instruction bytecode.</returns>
        public override uint GetWordCount()
        {
            uint wordCount = 0;

            wordCount += IdResultType.GetWordCount();
            wordCount += IdResult.GetWordCount();
            wordCount += GlobalWorkSize.GetWordCount();
            wordCount += LocalWorkSize.GetWordCount();
            wordCount += GlobalWorkOffset.GetWordCount();
            return(wordCount);
        }
Пример #3
0
 /// <summary>
 /// Write instruction operands into bytecode stream.
 /// </summary>
 /// <param name="writer">Bytecode writer.</param>
 public override void WriteOperands(WordWriter writer)
 {
     GlobalWorkSize.Write(writer);
     LocalWorkSize.Write(writer);
     GlobalWorkOffset.Write(writer);
 }