Category Archives: C#

Image with multi_for

         // Create an Image (320,200)          int Width = 320; int Height = 200;          using (Bitmap Image = new Bitmap(Width, Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb))          {               Algorithm.multi_for(new ulong[] { (ulong)Width, (ulong)Height }, delegate(ArraySegment<ulong> Indices)              {                  var Ix = (int)Indices.Array[Indices.Offset];                  var Iy = … Continue reading

Posted in C# | Leave a comment

C# Multifor, Dynamic count of nested loops

   public static class Algorithm    {        public delegate void OnIndexDelegate(ArraySegment<ulong> Indices);         public static void multi_for(ulong[] IterationCounts, OnIndexDelegate OnIndex)        {                       ulong v = (ulong)IterationCounts.Length +1;            ulong[] radix = new ulong[v];            radix[0] = 2;            ulong[] num   = new ulong[v];             … Continue reading

Posted in C# | Leave a comment