コード例 #1
0
 public void writeExtra(eExtra what, string VECTOR_TYPE, string TYPE_SUFFIX, string cns)
 {
     writer.WriteLine("		namespace {0}", cns);
     writer.WriteLine("		{");
     ExtraCodeParser.write(writer, what, 3, VECTOR_TYPE, TYPE_SUFFIX);
     writer.WriteLine("		}}	// namespace Intrinsics::{0}::{1}", ns, cns);
 }
コード例 #2
0
        public static void write(TextWriter tw, eExtra what, int nTabs, string VECTOR_TYPE, string TYPE_SUFFIX)
        {
            string tabs = new string( '\t', nTabs );

            foreach (var line in s_sources[what])
            {
                string dest = line.src;
                if (line.flags.HasFlag(LineFlags.HasVec))
                {
                    dest = dest.Replace("VECTOR_TYPE", VECTOR_TYPE);
                }
                if (line.flags.HasFlag(LineFlags.HasOp))
                {
                    dest = expandOp(dest, TYPE_SUFFIX);
                }
                if (line.flags.HasFlag(LineFlags.NeedsTabs))
                {
                    dest = tabs + dest;
                }
                tw.WriteLine(dest);
            }
        }
コード例 #3
0
 public void writeExtra(eExtra what, string VECTOR_TYPE, string TYPE_SUFFIX)
 {
     ExtraCodeParser.write(writer, what, 2, VECTOR_TYPE, TYPE_SUFFIX);
 }