This commit is contained in:
2025-07-23 08:16:27 +02:00
parent 51ba4bb433
commit 819f4bc00b
22 changed files with 71 additions and 19 deletions

1
.gitignore vendored
View File

@@ -1,7 +1,6 @@
build
*.html
*.pdf
res/badges
build.ninja
.ninja_log
.ninja_deps

View File

@@ -1,9 +1,9 @@
import os.path
import os
gen = """
rule regen
command = python config.py
generator = 1
command = python config.py
generator = 1
rule typst
depfile = $out.d
@@ -19,10 +19,17 @@ rule curl
command = curl $url > $out
rule cp
command = cp $in $out
command = cp $flags $in $out
rule cpdir
command = rm -rf $out && cp -rf $in $outdir
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
@@ -37,8 +44,11 @@ pages = [
"index.typ",
"compiler-pattern-matching.typ",
"article-favicon.typ",
"article-gpu-arch-1.typ",
]
fonts = [x for x in os.listdir("./res/fonts/")]
variants = [
{
"suffix": ".min.pdf",
@@ -82,22 +92,43 @@ if os.path.isfile("build/badges.txt"):
badge = badge.split("\t")
user = badge[0]
url = badge[1]
tg = "res/badges/" + user
tg = "build/res/badges/" + user
web_targets.append(tg)
gen += "\n"
gen += "build "+tg+": "
if user == "alex":
gen += "cp res/badge.png\n"
gen += "cp res/badge.png | build/res/_.txt\n"
else:
gen += "curl\n"
gen += "curl | build/res/_.txt\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 += "build build/index.html : cp build/index.typ.desktop.html\n"
web_targets.append("build/index.html")
gen += "\n"
gen += "default " + " ".join(web_targets) + "\n"
gen += """
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:
f.write(gen)

View 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
View File

@@ -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

0
res/_.txt Normal file
View File

View File

@@ -1 +0,0 @@
f256bdf8d1d8100be843a5f76ccfb5f0cb7315f98d075ae583b29916740e58ab res/badges/alex

View File

@@ -1 +0,0 @@
9aecefadc2369798121567c27b4599cb92dd8bd56d926f1544c3ddd860762605 res/badges/ote

View File

@@ -1 +0,0 @@
90a0093089d2ae940639aca8ca4dd86f0b7a20fd5b12adb313480b8b1868bc2b res/badges/syn

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
res/fonts/DejaVuSans.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
res/fonts/DejaVuSerif.ttf Normal file

Binary file not shown.