Computing Self-Organizing Maps in a Massively Parallel Way with CUDA. Part 2: Algorithms

In the previous post I spoke briefly about motivations for implementing self-organizing maps in F# using GPU with CUDA. I have finally been able to outperform a single threaded C++ implementation by a factor of about 1.5. This is quite modest, but on the other hand rather impressive since we started out by being 60 … Continue reading Computing Self-Organizing Maps in a Massively Parallel Way with CUDA. Part 2: Algorithms

Computing Self-Organizing Maps in a Massively Parallel Way with CUDA. Part 1: F#

By 2017, it is expected that GPUs will no longer be an external accelerator to a CPU; instead, CPUs and GPUs will be integrated on the same die with a unified memory architecture. Such a system eliminates some of accelerator architectures’ historical challenges, including requiring the programmer to manage multiple memory spaces, suffering from bandwidth … Continue reading Computing Self-Organizing Maps in a Massively Parallel Way with CUDA. Part 1: F#

Disposable Objects with Computation Expressions

The last post contains the description of a sqlMonad. It also happens to contain a silly and obvious (aren't they all in hindsight) bug. The bug is in implementing the containing CmdSqlBuilder with the IDisposable. While the intent was good (the class wraps resources that should be promptly disposed of - SqlCommand and SqlConnection): there … Continue reading Disposable Objects with Computation Expressions

Exploring Monadic Landscape: Sql Command Computation Expression

Most of the developers have dealt with calling SQL server stored procedures from their applications at least once or twice. In my last project, where intense data mining is done on the SQL side, this is basically all I am doing. There is always a desire to wrap and abstract the ever-repetitive code to get … Continue reading Exploring Monadic Landscape: Sql Command Computation Expression

Retry Monad: An Implementation

One application that seems quite intuitively to be a good case for "monadization" is that of retrying a function call upon an exception that is thrown while executing it. This may be needed for inherently unreliable operations, dependent on a network connection, for example. Discussions of this can be easily found. Here is one on … Continue reading Retry Monad: An Implementation

The Push Monad: Introduction

Chapter 5 of Friendly F# has a great practical explanation of F# computation expressions often called "monads" from their use in computer science and Haskell. The material in Chapter 5 of the book does a lot to demystify the concept, theoretical coverage of which is done well in this Wikipedia article. Monads are an example … Continue reading The Push Monad: Introduction

Outperforming MathNet with Task Parallel Library

Math.NET is a great project that brings numerics to .NET the OS way. Perusing their blog, I found this post on the on-line algorithm for std calculation. A simple Wiki search revealed this article that describes a parallel algorithm due to Chan for calculating variance (std = sqrt(variance)). So, I set to figure out whether … Continue reading Outperforming MathNet with Task Parallel Library