generated from Meekdai/Gmeek-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blogBase.json
1 lines (1 loc) · 10.6 KB
/
blogBase.json
1
{"singlePage": [], "startSite": "", "filingNum": "", "onePageListNum": 15, "commentLabelColor": "#006b75", "yearColorList": ["#bc4c00", "#0969da", "#1f883d", "#A333D0"], "i18n": "CN", "themeMode": "manual", "dayTheme": "light", "nightTheme": "dark", "urlMode": "pinyin", "script": "", "style": "", "head": "", "indexScript": "", "indexStyle": "", "bottomText": "", "showPostSource": 1, "iconList": {}, "UTC": 8, "rssSplit": "sentence", "exlink": {}, "needComment": 1, "allHead": "", "title": "Blog Title", "subTitle": "Blog description", "avatarUrl": "https://github.githubassets.com/favicons/favicon.svg", "GMEEK_VERSION": "last", "postListJson": {"P2": {"htmlDir": "docs/post/vscode-cha-jian-he-kai-fa-she-zhi.html", "labels": ["\u5f00\u53d1\u5de5\u5177"], "postTitle": "vscode\u63d2\u4ef6\u548c\u5f00\u53d1\u8bbe\u7f6e", "postUrl": "post/vscode-cha-jian-he-kai-fa-she-zhi.html", "postSourceUrl": "https://github.com/kwu130/kwu130.github.io/issues/2", "commentNum": 0, "wordCount": 1308, "description": "# \u63d2\u4ef6\u63a8\u8350\r\n\r\n## \u8bed\u8a00\u76f8\u5173\r\n\r\n### C/C++\r\n\r\nC/C++\r\nC/C++ Extension Pack\r\nC/C++ Themes\r\n\u63cf\u8ff0\uff1aC/C++ IntelliSense, debugging, and code browsing.\r\n\r\nCMake\r\nCMake Tools\r\n\u63cf\u8ff0\uff1aCMake langage support for Visual Studio Code.\r\n\r\n### Python\r\n\r\nPython\r\nPylance\r\nPython Debugger\r\n\u63cf\u8ff0\uff1aPython language support with extension access points for IntelliSense (Pylance), Debugging (Python Debugger), linting, formatting, refactoring, unit tests, and more.\r\n\r\n## \u8bed\u8a00\u65e0\u5173\r\nChinese (Simplified) (\u7b80\u4f53\u4e2d\u6587) Language Pack for Visual Studio Code\r\n\u63cf\u8ff0\uff1aLanguage pack extension for Chinese (Simplified).\r\n\r\nCode Runer\r\n\u63cf\u8ff0\uff1aRun code snippet or code file for multiple languages.\r\n\r\nDocker\r\n\u63cf\u8ff0\uff1aMakes it easy to create, manage, and debug containerized applications.\r\n\r\nError Lens\r\n\u63cf\u8ff0\uff1aImprove highlighting of errors, warnings and other language diagnostics.\r\n\r\nGitLens \u2014 Git supercharged\r\n\u63cf\u8ff0\uff1aSupercharge Git and unlock untapped knowledge within your repository to better understand, write, and review code.\r\n\r\nOne Dark Pro\r\n\u63cf\u8ff0\uff1aAtom's iconic One Dark theme for Visual Studio Code.\r\n\r\nRemote - SSH\r\nRemote - SSH: Editing Configuration Files\r\nRemote Explorer\r\n\u63cf\u8ff0\uff1aOpen any folder on a remote machine using SSH and take advantage of VS Code's full feature set.\r\n\r\nTabnine\r\n\u63cf\u8ff0\uff1aAI Autocomplete & Chat for Javascript, Python, Typescript, PHP, Go, Java & more.\r\n\r\n\r\n# \u5f00\u53d1\u8bbe\u7f6e\r\n\u3002", "top": 0, "createdAt": 1719813298, "style": "", "script": "", "head": "", "ogImage": "https://github.githubassets.com/favicons/favicon.svg", "createdDate": "2024-07-01", "dateLabelColor": "#bc4c00"}, "P4": {"htmlDir": "docs/post/Valgrind-jian-ce-nei-cun-xie-lou.html", "labels": ["C/C++"], "postTitle": "Valgrind\u68c0\u6d4b\u5185\u5b58\u6cc4\u6f0f", "postUrl": "post/Valgrind-jian-ce-nei-cun-xie-lou.html", "postSourceUrl": "https://github.com/kwu130/kwu130.github.io/issues/4", "commentNum": 0, "wordCount": 7415, "description": "# Valgrind\u4ecb\u7ecd\r\nValgrind \u53ef\u4ee5\u7528\u6765\u68c0\u6d4b\u7a0b\u5e8f\u662f\u5426\u6709\u975e\u6cd5\u4f7f\u7528\u5185\u5b58\u7684\u95ee\u9898\uff0c\u4f8b\u5982\u8bbf\u95ee\u672a\u521d\u59cb\u5316\u7684\u5185\u5b58\u3001\u8bbf\u95ee\u6570\u7ec4\u65f6\u8d8a\u754c\u3001\u5fd8\u8bb0\u91ca\u653e\u52a8\u6001\u5185\u5b58\u7b49\u95ee\u9898\u3002", "top": 0, "createdAt": 1722069417, "style": "", "script": "", "head": "", "ogImage": "https://github.githubassets.com/favicons/favicon.svg", "createdDate": "2024-07-27", "dateLabelColor": "#bc4c00"}, "P5": {"htmlDir": "docs/post/CUDA-she-bei-han-shu-zhong-de-long double-lei-xing.html", "labels": ["C/C++", "CUDA"], "postTitle": "CUDA\u8bbe\u5907\u51fd\u6570\u4e2d\u7684long double\u7c7b\u578b", "postUrl": "post/CUDA-she-bei-han-shu-zhong-de-long%20double-lei-xing.html", "postSourceUrl": "https://github.com/kwu130/kwu130.github.io/issues/5", "commentNum": 0, "wordCount": 8039, "description": "# \u80cc\u666f\r\n\u4eceCUDA\u8bbe\u5907\u7aefmath\u51fd\u6570\u58f0\u660e\u4e2d\u53d1\u73b0\u90e8\u5206\u51fd\u6570\u652f\u6301long double\u7c7b\u578b\u7684\u53c2\u6570\uff0c\u4f46\u5b9e\u9645\u5728\u4f7f\u7528\u65f6nvcc\u7f16\u8bd1\u5374\u53d1\u51fa\u4ee5\u4e0b\u8b66\u544a\uff1a\r\n```\r\n'long double' is treated as 'double' in device code\r\n```\r\n\u4ece\u5b57\u9762\u610f\u601d\u4e0a\u53ef\u4ee5\u770b\u51fa\uff0c\u5728\u8bbe\u5907\u7aef\u4ee3\u7801\u4e2d\uff0cCUDA\u5c06long double\u7c7b\u578b\u5f53\u505adouble\u7c7b\u578b\u6765\u5904\u7406\uff0c\u90a3\u4e48\u5b9e\u9645\u60c5\u51b5\u662f\u600e\u6837\u7684\u5462\uff1f\r\n\r\n# \u6d4b\u8bd5\r\n\u7f16\u8bd1\u4ee5\u4e0b\u6d4b\u8bd5\u4ee3\u7801\r\n```\r\n#include <iostream>\r\n#include <cstdio>\r\n#include <cuda_runtime.h>\r\n \r\n \r\n__global__\r\nvoid kernel(long double * d_data) {\r\n long double x = 1.3;\r\n *d_data = x;\r\n \r\n printf('--------------- device --------------\\n');\r\n char *ch = reinterpret_cast<char*>(d_data);\r\n for (int i = 0; i < sizeof(long double); ++i) {\r\n printf('addr: %p value: %08x\\n', &(ch[i]), ch[i]);\r\n }\r\n printf('\\n');\r\n \r\n double z = static_cast<double>(*d_data);\r\n ch = reinterpret_cast<char*>(&z);\r\n for (int i = 0; i < sizeof(double); ++i) {\r\n printf('addr: %p value: %08x\\n', &(ch[i]), ch[i]);\r\n }\r\n printf('\\n');\r\n}\r\n \r\nint main() {\r\n \r\n long double *d_data;\r\n long double *h_data;\r\n h_data = (long double*)malloc(sizeof(long double));\r\n cudaMalloc((void**)&d_data, sizeof(long double));\r\n kernel<<<1, 1>>>(d_data);\r\n \r\n cudaDeviceSynchronize();\r\n printf('--------------- host --------------\\n');\r\n \r\n cudaMemcpy(h_data, d_data, sizeof(long double), cudaMemcpyDeviceToHost);\r\n \r\n char *ch = reinterpret_cast<char*>(h_data);\r\n for (int i = 0; i < sizeof(long double); ++i) {\r\n printf('addr: %p value: %08x\\n', &ch[i], ch[i]);\r\n }\r\n printf('\\n');\r\n \r\n double x = 1.3;\r\n ch = reinterpret_cast<char*>(&x);\r\n for (int i = 0; i < sizeof(double); ++i) {\r\n printf('addr: %p value: %08x\\n', &ch[i], ch[i]);\r\n }\r\n printf('\\n');\r\n \r\n \r\n long double y = 1.3;\r\n ch = reinterpret_cast<char*>(&y);\r\n for (int i = 0; i < sizeof(long double); ++i) {\r\n printf('addr: %p value: %08x\\n', &ch[i], ch[i]);\r\n }\r\n printf('\\n');\r\n \r\n double z = static_cast<double>(y);\r\n ch = reinterpret_cast<char*>(&z);\r\n for (int i = 0; i < sizeof(double); ++i) {\r\n printf('addr: %p value: %08x\\n', &ch[i], ch[i]);\r\n }\r\n printf('\\n');\r\n \r\n return 0;\r\n}\r\n```\r\n\u8f93\u51fa\u7ed3\u679c\u5982\u4e0b\uff1a\r\n```\r\n--------------- device --------------\r\naddr: 0x7f2b80a00000 value: ffffffcd\r\naddr: 0x7f2b80a00001 value: ffffffcc\r\naddr: 0x7f2b80a00002 value: ffffffcc\r\naddr: 0x7f2b80a00003 value: ffffffcc\r\naddr: 0x7f2b80a00004 value: ffffffcc\r\naddr: 0x7f2b80a00005 value: ffffffcc\r\naddr: 0x7f2b80a00006 value: fffffff4\r\naddr: 0x7f2b80a00007 value: 0000003f\r\naddr: 0x7f2b80a00008 value: 00000000\r\naddr: 0x7f2b80a00009 value: 00000000\r\naddr: 0x7f2b80a0000a value: 00000000\r\naddr: 0x7f2b80a0000b value: 00000000\r\naddr: 0x7f2b80a0000c value: 00000000\r\naddr: 0x7f2b80a0000d value: 00000000\r\naddr: 0x7f2b80a0000e value: 00000000\r\naddr: 0x7f2b80a0000f value: 00000000\r\n \r\naddr: 0x7f2ba4fffd08 value: ffffffcd\r\naddr: 0x7f2ba4fffd09 value: ffffffcc\r\naddr: 0x7f2ba4fffd0a value: ffffffcc\r\naddr: 0x7f2ba4fffd0b value: ffffffcc\r\naddr: 0x7f2ba4fffd0c value: ffffffcc\r\naddr: 0x7f2ba4fffd0d value: ffffffcc\r\naddr: 0x7f2ba4fffd0e value: fffffff4\r\naddr: 0x7f2ba4fffd0f value: 0000003f\r\n \r\n--------------- host --------------\r\naddr: 0x6bde20 value: ffffffcd\r\naddr: 0x6bde21 value: ffffffcc\r\naddr: 0x6bde22 value: ffffffcc\r\naddr: 0x6bde23 value: ffffffcc\r\naddr: 0x6bde24 value: ffffffcc\r\naddr: 0x6bde25 value: ffffffcc\r\naddr: 0x6bde26 value: fffffff4\r\naddr: 0x6bde27 value: 0000003f\r\naddr: 0x6bde28 value: 00000000\r\naddr: 0x6bde29 value: 00000000\r\naddr: 0x6bde2a value: 00000000\r\naddr: 0x6bde2b value: 00000000\r\naddr: 0x6bde2c value: 00000000\r\naddr: 0x6bde2d value: 00000000\r\naddr: 0x6bde2e value: 00000000\r\naddr: 0x6bde2f value: 00000000\r\n \r\naddr: 0x7ffdc0ff3b08 value: ffffffcd\r\naddr: 0x7ffdc0ff3b09 value: ffffffcc\r\naddr: 0x7ffdc0ff3b0a value: ffffffcc\r\naddr: 0x7ffdc0ff3b0b value: ffffffcc\r\naddr: 0x7ffdc0ff3b0c value: ffffffcc\r\naddr: 0x7ffdc0ff3b0d value: ffffffcc\r\naddr: 0x7ffdc0ff3b0e value: fffffff4\r\naddr: 0x7ffdc0ff3b0f value: 0000003f\r\n \r\naddr: 0x7ffdc0ff3af0 value: 00000000\r\naddr: 0x7ffdc0ff3af1 value: 00000068\r\naddr: 0x7ffdc0ff3af2 value: 00000066\r\naddr: 0x7ffdc0ff3af3 value: 00000066\r\naddr: 0x7ffdc0ff3af4 value: 00000066\r\naddr: 0x7ffdc0ff3af5 value: 00000066\r\naddr: 0x7ffdc0ff3af6 value: 00000066\r\naddr: 0x7ffdc0ff3af7 value: ffffffa6\r\naddr: 0x7ffdc0ff3af8 value: ffffffff\r\naddr: 0x7ffdc0ff3af9 value: 0000003f\r\naddr: 0x7ffdc0ff3afa value: 00000000\r\naddr: 0x7ffdc0ff3afb value: 00000000\r\naddr: 0x7ffdc0ff3afc value: 00000001\r\naddr: 0x7ffdc0ff3afd value: 00000000\r\naddr: 0x7ffdc0ff3afe value: 00000000\r\naddr: 0x7ffdc0ff3aff value: 00000000\r\n \r\naddr: 0x7ffdc0ff3ae8 value: ffffffcd\r\naddr: 0x7ffdc0ff3ae9 value: ffffffcc\r\naddr: 0x7ffdc0ff3aea value: ffffffcc\r\naddr: 0x7ffdc0ff3aeb value: ffffffcc\r\naddr: 0x7ffdc0ff3aec value: ffffffcc\r\naddr: 0x7ffdc0ff3aed value: ffffffcc\r\naddr: 0x7ffdc0ff3aee value: fffffff4\r\naddr: 0x7ffdc0ff3aef value: 0000003f\r\n```\r\n\u73b0\u5728\u6211\u4eec\u7ed3\u5408\u8f93\u51fa\u6765\u8fdb\u884c\u5206\u6790\u3002", "top": 0, "createdAt": 1722071227, "style": "", "script": "", "head": "", "ogImage": "https://github.githubassets.com/favicons/favicon.svg", "createdDate": "2024-07-27", "dateLabelColor": "#bc4c00"}}, "singeListJson": {}, "labelColorDict": {"bug": "#d73a4a", "C/C++": "#fef2c0", "CUDA": "#822D68", "documentation": "#0075ca", "duplicate": "#cfd3d7", "enhancement": "#a2eeef", "good first issue": "#7057ff", "help wanted": "#008672", "invalid": "#e4e669", "question": "#d876e3", "wontfix": "#ffffff", "\u5f00\u53d1\u5de5\u5177": "#4C7E59"}, "displayTitle": "Blog Title", "faviconUrl": "https://github.githubassets.com/favicons/favicon.svg", "ogImage": "https://github.githubassets.com/favicons/favicon.svg", "primerCSS": "<link href='https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/Primer/21.0.7/primer.css' rel='stylesheet' />", "homeUrl": "https://kwu130.github.io", "prevUrl": "disabled", "nextUrl": "disabled"}