/// <summary>
 /// Write instruction operands into bytecode stream.
 /// </summary>
 /// <param name="writer">Bytecode writer.</param>
 public override void WriteOperands(WordWriter writer)
 {
     SubgroupCount.Write(writer);
     Invoke.Write(writer);
     Param.Write(writer);
     ParamSize.Write(writer);
     ParamAlign.Write(writer);
 }
        /// <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 += SubgroupCount.GetWordCount();
            wordCount += Invoke.GetWordCount();
            wordCount += Param.GetWordCount();
            wordCount += ParamSize.GetWordCount();
            wordCount += ParamAlign.GetWordCount();
            return(wordCount);
        }