Skip to content

Instantly share code, notes, and snippets.

@jean80it
jean80it / chatGPT_interview.txt
Last active January 19, 2023 17:40
GPU/Image Processing “interview” to chatGPT
me: Can you explain in simple terms the concept of coalescence in the context of GPGPU workloads?
chatGPT: Coalescence in the context of GPGPU workloads refers to the process of combining multiple memory accesses into a single memory access. This is done to improve the performance of the GPU by reducing the number of memory accesses that need to be made.
In simple terms, coalescence is a technique used to make the GPU's memory accesses more efficient by grouping several small memory requests together into one larger request. This can help to reduce the amount of time the GPU spends waiting for data to be loaded from memory, resulting in better overall performance.
me: Does keeping coalescence in mind affect the way a programmer organizes their code’s flow?
chatGPT: Yes, keeping coalescence in mind can affect the way a programmer organizes their code's flow.
To achieve good coalescence, the programmer must ensure that the GPU's threads access memory in a way that allows for efficient memory accesses. This o
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Threading;
using System.Windows.Forms;
namespace ScreenCapture
{
class Program
{
@jean80it
jean80it / callableTest.cpp
Created March 10, 2015 08:18
Test for "callable" performance (functors, lambdas, ...)
#include <ctime>
#include <functional>
#include <stdio.h>
// release:
//
//direct call : 0.063000
//virtual call : 0.301000
//lambda : 0.063000
//fn ptr : 0.265000
@jean80it
jean80it / measure.cmd
Last active December 20, 2015 00:49
Example of script to measure entries of 1st coding contest on InvieVault (3 files x current disk). REMs are prepended to files not reported to be correct by "correct" script
@echo off
GetTiming -i >> results.txt
del input.txt
copy small.txt input.txt
echo Performing 51 executions on small file >> results.txt
GetTiming -h >> results.txt
@jean80it
jean80it / correct.cmd
Created July 20, 2013 10:11
Example of script used to correct entries to 1° coding contest on IndieVault.
@echo off
del corr_results.txt
REM =====================================================================
del input.txt
copy small.txt input.txt
echo testing DuskEntry.exe for correctness on small
@jean80it
jean80it / DOFStacker mod
Created June 12, 2013 18:44
A CHDK DOF-stack script modified to take a given amount of shots. Runs on an A810 HD. See comments for more.
@title DOF stackmaker
rem original script at http://chdk.wikia.com/wiki/UBASIC/Scripts:_macro_DOFstacker
rem slightly modified in order to take a given amounts of shots on an A810 HD
@param a closeStart dist (mm)
@default a 0
@param b closeStart dist (cm)
@default b 0
@param c closeStart dist (m)
@default c 0