Microsoft has recently announced at the AMD Fusion Developer Summit the introduction of a new technology called C++ Accelerated Massive Parallelism or shortly C++ AMP that helps C++ developers use the GPU for parallel programming. The new technology will be part of Visual C++, integrated with full support (edit, build, debug, profile) in the next version of Visual Studio. It is built in modern C++ on top of DirectX. It will provide an STL-like library, part of the Concurrency namespace, delivered in a amp.h header.

S.Somasegar (Senior Vice President of the Developer Division) said:

By building on the Windows DirectX platform, our implementation of C++ AMP allows you to target hardware from all the major hardware vendors. We expect that it will be part of the next Visual C++ compiler and fully integrated in the next release of Visual Studio experience.

You can read more about it here:

Looking forward for the first CTP and samples.

UPDATE
Herb Sutter introduces C++ AMP at the AMD Fusion Developer Summit 11

Daniel Moth digs deeper into C++ AMP with code samples and more

Herb Sutter

How long is your password? How long it will take a 100,000,000 GPU cores running at what, a million attempts per second to crack your password just by brute force? That where almost a kid can write that. An that is just a tiny example of how game changing this is.

, , , , Hits for this post: 6194 .

.NET 3.0 provides some support for working with ZIP files. However, it has an important drawback: it only works for packages that are conformant to the Open Packaging Convention standard. Most of the ZIP files are not. Codeplex features a library called DotNetZip that provides support for packing and unpacking in C#, VB.NET or any other .NET language, but also any COM environment, including Javascript, VBSCript, VB6, VBA, PHP, Perl. In addition to the basic packing and unpacking operations, it supports password protection, UNICODE filenames, ZIP64 and AES encryption, comment, and others. Here are some simple samples.

Creating a ZIP file:

      public static void PackZip(string source, string targetzip)
      {
         if(File.Exists(source))
         {
            PackFile(source, targetzip);
         }
         else if(Directory.Exists(source))
         {
            PackFolder(source, targetzip);
         }
         else
         {
            Console.WriteLine("Source does not exists!");
         }
      }

      public static void PackFile(string file, string targetzip)
      {
         using (ZipFile zipfile = new ZipFile())
         {
            zipfile.AddFile(file, String.Empty);
            zipfile.Save(targetzip);
         }
      }

      public static void PackFolder(string folder, string targetzip)
      {
         using (ZipFile zipfile = new ZipFile())
         {
            zipfile.AddDirectory(folder);
            zipfile.Save(targetzip);
         }
      }

Unpacking to a target folder:

      public static void UnpackZip(string zippath, string targetdir)
      {
         if(ZipFile.IsZipFile(zippath))
         {
            using (ZipFile zipfile = ZipFile.Read(zippath))
            {
               foreach (ZipEntry zipentry in zipfile)
               {
                  try
                  {
                     zipentry.Extract(targetdir, ExtractExistingFileAction.OverwriteSilently);
                  }
                  catch (ZipException ex)
                  {
                     if (ex.InnerException == null)
                     {
                        Console.WriteLine(ex.Message);
                     }
                     else
                     {
                        Console.WriteLine("{0}: {1}", ex.Message, ex.InnerException.Message);
                     }
                  }
               }
            }
         }
         else
         {
            Console.WriteLine("Not a zip file!");
         }
      }

Display the content of a ZIP archive:

      public static void ShowZipContent(string zippath)
      {
         if(ZipFile.IsZipFile(zippath))
         {
            using(ZipFile zipfile = ZipFile.Read(zippath))
            {
               foreach(ZipEntry zipentry in zipfile)
               {
                  Console.WriteLine("{0}", zipentry.FileName);
               }
            }
         }
         else
         {
            Console.WriteLine("Not a zip file!");
         }
      }

You can find many more examples on Codeplex: C# and VB.NET.

, , , , Hits for this post: 7474 .

MSDN Code Gallery made available an update for the Windows API Code Pack for .NET Framework 3.5 (or above), a library that provides access to some Window 7 features and some existing features in previous operating systems. It includes:

  • Windows 7 Taskbar Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars.
  • Known Folders, Windows 7 Libraries, non-file system containers, and a hierarchy of Shell Namespace entities.
  • Windows 7 Explorer Browser Control.
  • Shell property system.
  • Windows Vista and Windows 7 Common File Dialogs, including custom controls.
  • Windows Vista and Windows 7 Task Dialogs.
  • Direct3D 11.0, Direct3D 10.1/10.0, DXGI 1.0/1.1, Direct2D 1.0, DirectWrite, Windows Imaging Component (WIC) APIs. (DirectWrite and WIC have partial support)
  • Sensor Platform APIs
  • Extended Linguistic Services APIs
  • Power Management APIs
  • Application Restart and Recovery APIs
  • Network List Manager APIs
  • ommand Link control and System defined Shell icons.

The requirements for using this library are:

  • .NET Framework 3.5
  • Windows 7 RC (some features work on previous operating systems too)
  • DirectX features have dependency on Windows SDK for Windows 7 RC and March 2009 release of DirectX SDK

You can download the Code Pack library from here.

, , , Hits for this post: 12805 .