Skip to content

Commit

Permalink
random updates
Browse files Browse the repository at this point in the history
  • Loading branch information
baluteshih committed Apr 6, 2024
1 parent adef3fa commit 7cdafbb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions codebook/1_Basic/Pragma.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC optimize("no-math-errno,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
#pragma GCC target("popcnt,abm,mmx,avx,arch=skylake")
__builtin_ia32_ldmxcsr(__builtin_ia32_stmxcsr()|0x8040)
4 changes: 2 additions & 2 deletions codebook/1_Basic/vimrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ syntax on
hi cursorline cterm=none ctermbg=89
set bg=dark
inoremap {<CR> {<CR>}<Esc>ko<tab>
" Select region and then type :Hash to hash your selection.
" Useful for verifying that there aren't mistypes.
"Select region and then type :Hash to hash your selection."
"Useful for verifying that there aren't mistypes."
ca Hash w !cpp -dD -P -fpreprocessed \| tr -d '[:space:]' \| md5sum \| cut -c-6
2 changes: 1 addition & 1 deletion codebook/codebook.tex
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\contentsname}{Contents}
\newcommand{\inputcode}[2]{
\subsection[#1]{#1 [\texttt{\captureshell{cpp #2 -dD -P -fpreprocessed | tr -d '[:space:]' | md5sum | cut -c-6}}]}
\subsection[#1]{#1 \footnotesize{[\texttt{\captureshell{cpp #2 -dD -P -fpreprocessed | tr -d '[:space:]' | md5sum | cut -c-6}}]}}
\lstinputlisting{#2}
}

Expand Down
4 changes: 2 additions & 2 deletions codebook/content.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ \section{Basic}
\subsection{vimrc}
\lstinputlisting{1_Basic/vimrc.cpp}
\inputcode{readchar}{1_Basic/readchar.cpp}
\subsection{Black Magic}
\lstinputlisting{1_Basic/black_magic.cpp}
\inputcode{Black Magic}{1_Basic/black_magic.cpp}
\inputcode{Pragma Optimization}{Pragma.cpp}
% \subsection{Texas hold'em}
% \lstinputlisting{1_Basic/Texas_holdem.cpp}

Expand Down

0 comments on commit 7cdafbb

Please sign in to comment.