摘要: C++ Primer 4th Edition01. initialization int ival(1024); //direct-initialization !! int ival = 1024; //copy-initialization02. EOF: Windows -- ctrl+z Unix/MacOS -- ctrl+d03. manipulator: std::endl04.sizeof(wchar_t) = 405.对象=有类型的内存区域06. 文件中全局作用域里定义的变量:非const变量,可见性默认是extern的;const变量,可见性默认是当前文件的;07. hea 阅读全文
posted @ 2011-04-19 09:14 soulnearby 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Ref: http://moinmo.in/HowTo/UbuntuQuicklog files: tail /var/log/... 阅读全文
posted @ 2011-04-08 13:05 soulnearby 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Ref to "The CUDA Compiler Driver NVCC, Last modified on:<08-23-2010>"Some useful options:-c-ptx-v-keep-clean-arch-code-gencodeUsing this command: nvcc VecAdd.cu -keep -vVerbose#$ _SPACE_= #$ _CUDART_=cudart#$ _HERE_=/usr/local/cuda/bin#$ _THERE_=/usr/local/cuda/bin#$ _TARGET_SIZE_=#$ 阅读全文
posted @ 2011-04-07 18:17 soulnearby 阅读(336) 评论(0) 推荐(0) 编辑
摘要: source code, VecAdd.cuVecAdd.cu#include <iostream>#define MAXN 128__global__ void VecAdd( float* A, float* B, float* C ) { int i = threadIdx.x; for( ; i < MAXN; i += 128 ) { C[i] = A[i] + B[i]; }}int main( int argc, char **argv ) { float h_A[MAXN], h_B[MAXN], h_C[MAXN]; float *d_A, *d_B, *d 阅读全文
posted @ 2011-04-07 18:17 soulnearby 阅读(242) 评论(0) 推荐(0) 编辑
摘要: PIC: position-independent codemkdir -v: print a message for each created directorymkdir -p: no error if existing, make parent directories as needed 阅读全文
posted @ 2011-04-01 12:03 soulnearby 阅读(151) 评论(0) 推荐(0) 编辑
摘要: ---------------------------------------------------------------------------------------------------Simulation versus Emulation Simulation: Simulation is the imitation of some real thing, state of affairs, or process. Flight Simulator: 模拟飞行操作的过程,反映各个过程时的系统状态。 Emulation: An emulator in computing dupli 阅读全文
posted @ 2011-03-28 17:54 soulnearby 阅读(289) 评论(2) 推荐(0) 编辑