C++ interface

Advertisements
Posted in Kategorizálatlan | Leave a comment

QuickSort in Assembly

Here is my own HAND MADE (assembly 32bit 8086) quicksort implementation in JPG!

(next time : C++ interface )

 

Posted in Számítógép és internet | Leave a comment

Megjelent a 11.2-es

Posted in Kategorizálatlan | Leave a comment

opensuse.hu készül

,

Érdekel, hogy mi lesz ebből.

Posted in Kategorizálatlan | Leave a comment

opensuse

Posted in Kategorizálatlan | Leave a comment

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 = (int)Indices.Array[Indices.Offset + 1];

                  var r = (int)((Ix / (float)Width) * 255f);
                  var g = (int)0;
                  var b = (int)((Iy / (float)Height) * 255f);

                  Image.SetPixel(Ix, Iy, Color.FromArgb(r, g, b));

              });

              using (SaveFileDialog dlg = new SaveFileDialog())
              {
                  if (dlg.ShowDialog(this) == DialogResult.OK)
                  {
                      Image.Save(dlg.FileName);
                  }
              }
          }

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];

            IterationCounts.CopyTo(radix,0+1);

            ulong nx;
            while (num[0] == 0)
            {
                OnIndex(new ArraySegment<ulong>(num, 1, num.Length – 1));
                nx = v-1 ;
                num[nx] = (num[nx] + 1) % radix[nx];
                while (num[nx] == 0)
                {
                    nx–;//nx = nx – 1;
                    num[nx] = (num[nx] + 1) % radix[nx];
                }
          }
       }

    } // end class

Posted in C# | Leave a comment