Recent Posts

混用不同版本的 libc 造成程序崩溃

程序发生崩溃,调试器提示崩溃发生在 libc 的 free() 函数里面:

Debug Assertion Failed: _CrtIsValidHeapPointer(pUserData)

初步判断,可能是堆(Heap)被写坏了。

于是修改代码,在程序 …

Highlight All Occurrences of Selected Word

在选中某个单词(比如变量、函数、自定义类型,等等)时,如果能把屏幕上所有出现这个单词的地方,都高亮显示出来,对于程序 …

Remove Trailing Whitespace in Visual Studio

编程习惯里通常会建议删除行尾的空格。在 Visual Studio 里,可以通过 Ctrl+K, Ctrl+\ 的按键操作来实现。

不过每次通过手动的方式,未免有 …

What is ULP?

The maximum relative error is defined as ulp (units in the last place).

The ULP is defined as follows:

If x is a real number that lies between two finite consecutive
floating-point numbers a and b, without being equal to one of them,
then ulp(x) = |b - a|, otherwise ulp …

Find the file by inode number

在命令行下会遇到一些文件名里包含有中文、符号或者某些奇怪字符的文件,如果命令的自动补全不完整,键盘操作起来 …

Set Event Callback in OpenCL

这个 API 用来注册回调函数,在(Event 对应的)Command 执行到指定状态时,回调函数会被触发。这个 API 在使用及实现上不是很复杂。 以下 …

iPhone Photo Library "Ghost" Space

最近 iPhone 手机遇到个问题:照片拍了很多了,想清理一下,结果发现即使是删掉了绝大部分照片,照片图库仍然占用了大量的 …

Merging the upstream repository into the fork

如何在 git 里合并上游仓库的更新?这里是一个 GitHub 的文档, https://help.github.com/articles/merging-an-upstream-repository-into-your-fork/,关于对 fork 进行更新。

记录一下,备忘。

o 切换到 master 分支 …

Dial Toll Free Numbers in Skype

电话会议,一般是用电话拨进去参加的会议,其中有些号码是免费的,有些则是付费的。

当然,如果 Dial-In Number 里包括了以下这些:

USA …

Global and Local Work Size in OpenCL

The work-items in a given work-group execute concurrently on the processing elements of a single compute unit. This is a critical point in understanding the concurrency in OpenCL. ... OpenCL only assures that the workitems within a work-group execute concurrently (and share processor resources on the device).

  • global work offset: what …