Menu
  • HOME
  • TAGS

Compress “sparse data” with CUDA (CCL: connected component labeling reduction)

cuda,gpu,cudafy.net

One possible approach would be to use a sequence of: thrust::transform - to convert the input data to all 1 or 0: 0 27 42 0 18 99 94 91 0 -- input data 0 1 1 0 1 1 1 1 0 -- this will be our "mask vector"...

inconsistent timing from .net StopWatch

c#,.net,timing,stopwatch,cudafy.net

As the TotalMilliseconds is constantly incrementing & you are trying to find differences between points in time, you need to subtract the sum of the preceding differences after the second one, hence : tIQR = watch.Elapsed.TotalMillisconds - (tHistogram + tHistogramSum); & tThresholdOnly= watch.Elapsed.TotalMillisconds - (tHistogram + tHistogramSum + tIQR); ...

Calculate intersecting coordinates from vector

c#,vector,coordinates,cudafy.net

After a bit of searching I found Bresenham's line algorithm which was more or less just what I needed. Please refer to this answer if you're interested in the algorithm I used....