This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| #-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
| REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
| if [ -z "$REPO_URL" ]; then | |
| echo "-- ERROR: Could not identify Repo url." | |
| echo " It is possible this repo is already using SSH instead of HTTPS." | |
| exit | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cuda_runtime.h> | |
| #include <device_launch_parameters.h> | |
| // GTS450 sm_21 | |
| #define NUM_SM 4 // no. of streaming multiprocessors | |
| #define NUM_WARP_PER_SM 48 // maximum no. of resident warps per SM | |
| #define NUM_BLOCK_PER_SM 8 // maximum no. of resident blocks per SM | |
| #define NUM_BLOCK NUM_SM * NUM_BLOCK_PER_SM | |
| #define NUM_WARP_PER_BLOCK NUM_WARP_PER_SM / NUM_BLOCK_PER_SM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit acc0182c3d3869802bc20c8bf4e04c3464936bcc | |
| Author: Douglas Hellinger <[email protected]> | |
| Date: Sun Nov 19 22:48:46 2017 +0800 | |
| Fix tracerPid=0 in /proc | |
| diff --git a/fs/proc/array.c b/fs/proc/array.c | |
| index 6f6fc16..bcf470d 100644 | |
| --- a/fs/proc/array.c | |
| +++ b/fs/proc/array.c |
Download and Install Emscripten
- My preferred installation location is
/home/user - Get the latest sdk:
git clone https://github.com/emscripten-core/emsdk.git - Enter the cloned directory:
cd emsdk - Checkout main:
git checkout main - Install the lastest sdk tools:
./emsdk install latest - Activate the latest sdk tools:
./emsdk activate latest - Activate path variables:
source ./emsdk_env.sh
- How to Cross Compile LLVM: https://llvm.org/docs/HowToCrossCompileLLVM.html
- Building LLVM with CMake: https://llvm.org/docs/CMake.html
- Hints from wasi-sdk Makefile: https://github.com/CraneStation/wasi-sdk/blob/master/Makefile
- Try compiling natively (needed for llvm-tblgen and clang-tblgen)
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;WebAssembly" -DLLVM_ENABLE_PROJECTS="lld;clang" ../llvm
- Try building LLVM with WASI:
- cmake -G Ninja -DCMAKE_AR=”/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-ar” -DCMAKE_RANLIB=”/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-ranlib” -DCMAKE_C_COMPILER="/usr/local/google/home/binji/dev/wasi-sdk-5.0/opt/wasi-sdk/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/google/home/binji/dev/wasi-sdk-5.0/opt/wasi-sdk/bin/clang++" -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/usr/local/google/home/binji/dev/wasi-clang -DLLVM_TABLEGEN=/usr/local/google/home/binji/dev/llvm-project/build/bin/llvm-tblgen -DCLANG_TABLEGEN=/
Recently, I've been trying to find out the difference between copy-initialization (e.g. in return statements) and direct-initialization (e.g. in static_cast expressions). Besides the explicit keyword, the code posted by Johannes really caught my attention because recent versions of GCC and Clang exhibit different behaviors for the mentioned code. Upon further investigation, it may be surprising that these behaviors are somewhat intentional. In the following, I will try to explain this corner case of initialization in C++. This post may be a bit arcane. Anyway, have fun reading!
Given the following code:
// -std=c++23