Saturday, October 4, 2014

cudaMemcpyAsync

First step in pinpointing illegal memory accesses in CUDA asynchronous memory transfers:

#ifdef DEBUG
#define cudaMemcpyAsync(D, S, N, T, STR) \
    (cudaMemcpy((D), (S), (N), (T)))
#endif

Wednesday, July 16, 2014

NTFS Write Support on OSX with ntfs-3g

  1. Install ntfs-3g using your favorite package manager
  2. Replace the mount command as described  here or here (tl;dr of the first link).
  3. At this point, when plugging in an NTFS formatted disk, Mavericks will complain that the fuse kernel extension is unsigned. Create a self-signed certificate.
  4. Sign the fuse kernel extension with that certificate: sudo codesign -s "NameOfTheSelfSignedCertificate" -f /opt/local/Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext (or whereever that kext resides).

Friday, April 25, 2014

PDF annotations vs LaTeX

Protip: PDF annotations do not show when including the PDF file in a LaTeX document using \includegraphics. My workaround is to annotate the PDF in question (e. g. in Apple's Preview.app) and then "Export as PDF..." from Preview.app. This causes the annotations to become part of the real document.
In case anybody was wondering why you would export a PDF as PDF.