个人 CUDA 编程学习笔记与示例代码。
CUDA Learning/
├── LICENSE # MIT 开源许可
├── CMakeLists.txt # CMake 构建配置
├── README.md # 本文件
├── .gitignore # Git 忽略规则
├── VectorAdd/ # 向量加法 — CUDA 入门示例
│ ├── README.md
│ ├── vector_add_unified_memory.cu # 统一内存版本
│ └── vector_add_explicit_memory.cu # 显式内存管理版本
└── ErrorCheck/ # CUDA 错误检查 — 三种错误处理模式
├── README.md
├── error_check_with_macro.cu # 宏封装检查
├── self_made_error_check.cu # 手动检查
└── kernel_error_check.cu # 内核启动/执行错误检查
| 组件 | 版本 |
|---|---|
| OS | Windows 11 |
| CUDA | 13.2 |
| Compiler | Visual Studio 2022 |
| Build System | CMake 3.18+ |
在 x64 Native Tools Command Prompt for VS 2022 中执行:
cd build
cmake -G "Visual Studio 17 2022" -A x64 ..
cmake --build . --config Debug