diff --git a/vs_code/c_cpp_properties.json b/vs_code/c_cpp_properties.json new file mode 100644 index 0000000..13ff85a --- /dev/null +++ b/vs_code/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**", + "C:/msys64/mingw64/include", + "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/include" + ], + "defines": [], + "compilerPath": "C:/msys64/mingw64/bin/g++.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/vs_code/launch.json b/vs_code/launch.json new file mode 100644 index 0000000..4d1a665 --- /dev/null +++ b/vs_code/launch.json @@ -0,0 +1,47 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "g++ Debug", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/bin/black_hole.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/src", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "build" + }, + { + "name": "CUDA Debug", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/bin/black_hole.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/src", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "build-cuda" + } + ] +} \ No newline at end of file diff --git a/vs_code/settings.json b/vs_code/settings.json new file mode 100644 index 0000000..145c23d --- /dev/null +++ b/vs_code/settings.json @@ -0,0 +1,77 @@ +{ + "files.associations": { + "ostream": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "charconv": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "concepts": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "format": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "numbers": "cpp", + "span": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "text_encoding": "cpp", + "cinttypes": "cpp", + "typeinfo": "cpp", + "variant": "cpp", + "chrono": "cpp", + "ratio": "cpp", + "iomanip": "cpp", + "semaphore": "cpp", + "sstream": "cpp", + "stop_token": "cpp", + "thread": "cpp", + "cstring": "cpp", + "ios": "cpp", + "list": "cpp", + "xfacet": "cpp", + "xhash": "cpp", + "xiosbase": "cpp", + "xlocale": "cpp", + "xlocinfo": "cpp", + "xlocnum": "cpp", + "xmemory": "cpp", + "xstddef": "cpp", + "xstring": "cpp", + "xtr1common": "cpp", + "xutility": "cpp" + } +} \ No newline at end of file diff --git a/vs_code/tasks.json b/vs_code/tasks.json index 8b13789..b9a6a36 100644 --- a/vs_code/tasks.json +++ b/vs_code/tasks.json @@ -1 +1,57 @@ - +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "cppbuild", + "command": "C:/msys64/mingw64/bin/g++.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${workspaceFolder}/src/black_hole.cpp", + "-o", + "${workspaceFolder}/bin/black_hole.exe", + "-IC:/msys64/mingw64/include", + "-LC:/msys64/mingw64/lib", + "-lglfw3", + "-lglew32", + "-lopengl32", + "-lgdi32" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "compiler: C:/msys64/mingw64/bin/g++.exe" + }, + { + "label": "build-cuda", + "type": "shell", + "command": "\"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/bin/nvcc.exe\"", + "args": [ + "-o", + "${workspaceFolder}/bin/black_hole_cuda.exe", + "${workspaceFolder}/src/black_hole.cu", + "-IC:/msys64/mingw64/include", + "-IC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/include", + "-LC:/msys64/mingw64/lib", + "-LC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/lib/x64", + "-lglfw3", + "-lglew32", + "-lopengl32", + "-lgdi32", + "-lcudart" + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "group": "build" + } + ] +} \ No newline at end of file