mirror of
https://github.com/alex-s168/website.git
synced 2025-09-10 01:05:07 +02:00
c
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,7 +1,6 @@
|
|||||||
build
|
build
|
||||||
*.html
|
*.html
|
||||||
*.pdf
|
*.pdf
|
||||||
res/badges
|
|
||||||
build.ninja
|
build.ninja
|
||||||
.ninja_log
|
.ninja_log
|
||||||
.ninja_deps
|
.ninja_deps
|
||||||
|
51
config.py
51
config.py
@@ -1,9 +1,9 @@
|
|||||||
import os.path
|
import os
|
||||||
|
|
||||||
gen = """
|
gen = """
|
||||||
rule regen
|
rule regen
|
||||||
command = python config.py
|
command = python config.py
|
||||||
generator = 1
|
generator = 1
|
||||||
|
|
||||||
rule typst
|
rule typst
|
||||||
depfile = $out.d
|
depfile = $out.d
|
||||||
@@ -19,10 +19,17 @@ rule curl
|
|||||||
command = curl $url > $out
|
command = curl $url > $out
|
||||||
|
|
||||||
rule cp
|
rule cp
|
||||||
command = cp $in $out
|
command = cp $flags $in $out
|
||||||
|
|
||||||
|
rule cpdir
|
||||||
|
command = rm -rf $out && cp -rf $in $outdir
|
||||||
|
|
||||||
rule runclean
|
rule runclean
|
||||||
command = ninja -t clean && rm -rf build
|
command = rm -rf build && ninja -t clean
|
||||||
|
|
||||||
|
rule ttf2woff
|
||||||
|
command = fonttools ttLib.woff2 compress $in -o $out
|
||||||
|
|
||||||
|
|
||||||
build build/badges.txt: badges_list common.typ
|
build build/badges.txt: badges_list common.typ
|
||||||
|
|
||||||
@@ -37,8 +44,11 @@ pages = [
|
|||||||
"index.typ",
|
"index.typ",
|
||||||
"compiler-pattern-matching.typ",
|
"compiler-pattern-matching.typ",
|
||||||
"article-favicon.typ",
|
"article-favicon.typ",
|
||||||
|
"article-gpu-arch-1.typ",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
fonts = [x for x in os.listdir("./res/fonts/")]
|
||||||
|
|
||||||
variants = [
|
variants = [
|
||||||
{
|
{
|
||||||
"suffix": ".min.pdf",
|
"suffix": ".min.pdf",
|
||||||
@@ -82,22 +92,43 @@ if os.path.isfile("build/badges.txt"):
|
|||||||
badge = badge.split("\t")
|
badge = badge.split("\t")
|
||||||
user = badge[0]
|
user = badge[0]
|
||||||
url = badge[1]
|
url = badge[1]
|
||||||
tg = "res/badges/" + user
|
tg = "build/res/badges/" + user
|
||||||
web_targets.append(tg)
|
web_targets.append(tg)
|
||||||
gen += "\n"
|
gen += "\n"
|
||||||
gen += "build "+tg+": "
|
gen += "build "+tg+": "
|
||||||
if user == "alex":
|
if user == "alex":
|
||||||
gen += "cp res/badge.png\n"
|
gen += "cp res/badge.png | build/res/_.txt\n"
|
||||||
else:
|
else:
|
||||||
gen += "curl\n"
|
gen += "curl | build/res/_.txt\n"
|
||||||
gen += " url = "+url+"\n"
|
gen += " url = "+url+"\n"
|
||||||
|
|
||||||
|
for font in fonts:
|
||||||
|
font = font.replace(".ttf", "")
|
||||||
|
tg = f"build/res/{font}.woff2"
|
||||||
|
web_targets.append(tg)
|
||||||
|
gen += "\n"
|
||||||
|
gen += f"build {tg} : ttf2woff res/fonts/{font}.ttf | build/res/_.txt\n"
|
||||||
|
|
||||||
gen += "\n"
|
gen += "\n"
|
||||||
gen += "build build/index.html : cp build/index.typ.desktop.html\n"
|
gen += "build build/index.html : cp build/index.typ.desktop.html\n"
|
||||||
web_targets.append("build/index.html")
|
web_targets.append("build/index.html")
|
||||||
|
|
||||||
gen += "\n"
|
gen += """
|
||||||
gen += "default " + " ".join(web_targets) + "\n"
|
build build/res/_.txt : cpdir res | res/_.txt
|
||||||
|
outdir = build
|
||||||
|
"""
|
||||||
|
web_targets.append("build/res/_.txt")
|
||||||
|
|
||||||
|
gen += """
|
||||||
|
build web: phony """+ " ".join(web_targets) +"""
|
||||||
|
|
||||||
|
rule pub_cmd
|
||||||
|
command = rsync -avz build root@195.26.251.204:/srv/http/alex
|
||||||
|
pool = console
|
||||||
|
build pub: pub_cmd | web
|
||||||
|
|
||||||
|
default web
|
||||||
|
"""
|
||||||
|
|
||||||
with open("build.ninja", "w") as f:
|
with open("build.ninja", "w") as f:
|
||||||
f.write(gen)
|
f.write(gen)
|
||||||
|
30
pages/article-gpu-arch-1.typ
Normal file
30
pages/article-gpu-arch-1.typ
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#import "../common.typ": *
|
||||||
|
#import "../simple-page-layout.typ": *
|
||||||
|
#import "../core-page-style.typ": *
|
||||||
|
#import "../components/header.typ": rev-and-authors
|
||||||
|
|
||||||
|
#simple-page(
|
||||||
|
gen-table-of-contents: true,
|
||||||
|
[GPU architecture: SIMD - Alexander Nutz]
|
||||||
|
)[
|
||||||
|
|
||||||
|
#section[
|
||||||
|
#title[GPU Architecture: Compute Cores]
|
||||||
|
|
||||||
|
#sized-p(small-font-size)[
|
||||||
|
#rev-and-authors((people.alex,))
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
#if is-web {section[
|
||||||
|
Note that the #gen-min-pdf-link[PDF Version] of this page might look a bit better styling wise.
|
||||||
|
]}
|
||||||
|
|
||||||
|
#section[
|
||||||
|
= Introduction
|
||||||
|
GPUs consists of multiple (commonly 64) compute units.
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
]
|
5
pub.sh
5
pub.sh
@@ -1,5 +0,0 @@
|
|||||||
set -e
|
|
||||||
ninja
|
|
||||||
#scp -r build/* root@195.26.251.204:/srv/http/alex
|
|
||||||
rsync -avz build root@195.26.251.204:/srv/http/alex
|
|
||||||
#scp -r res/* root@195.26.251.204:/srv/http/alex/res
|
|
@@ -1 +0,0 @@
|
|||||||
f256bdf8d1d8100be843a5f76ccfb5f0cb7315f98d075ae583b29916740e58ab res/badges/alex
|
|
@@ -1 +0,0 @@
|
|||||||
9aecefadc2369798121567c27b4599cb92dd8bd56d926f1544c3ddd860762605 res/badges/ote
|
|
@@ -1 +0,0 @@
|
|||||||
90a0093089d2ae940639aca8ca4dd86f0b7a20fd5b12adb313480b8b1868bc2b res/badges/syn
|
|
BIN
res/fonts/DejaVuMathTeXGyre.ttf
Normal file
BIN
res/fonts/DejaVuMathTeXGyre.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSans-Bold.ttf
Normal file
BIN
res/fonts/DejaVuSans-Bold.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSans-BoldOblique.ttf
Normal file
BIN
res/fonts/DejaVuSans-BoldOblique.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSans-ExtraLight.ttf
Normal file
BIN
res/fonts/DejaVuSans-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSans-Oblique.ttf
Normal file
BIN
res/fonts/DejaVuSans-Oblique.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSans.ttf
Normal file
BIN
res/fonts/DejaVuSans.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSansMono-Bold.ttf
Normal file
BIN
res/fonts/DejaVuSansMono-Bold.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSansMono-BoldOblique.ttf
Normal file
BIN
res/fonts/DejaVuSansMono-BoldOblique.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSansMono-Oblique.ttf
Normal file
BIN
res/fonts/DejaVuSansMono-Oblique.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSansMono.ttf
Normal file
BIN
res/fonts/DejaVuSansMono.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSerif-Bold.ttf
Normal file
BIN
res/fonts/DejaVuSerif-Bold.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSerif-BoldItalic.ttf
Normal file
BIN
res/fonts/DejaVuSerif-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSerif-Italic.ttf
Normal file
BIN
res/fonts/DejaVuSerif-Italic.ttf
Normal file
Binary file not shown.
BIN
res/fonts/DejaVuSerif.ttf
Normal file
BIN
res/fonts/DejaVuSerif.ttf
Normal file
Binary file not shown.
Reference in New Issue
Block a user