diff --git a/GPU_puzzlers.ipynb b/GPU_puzzlers.ipynb
index 10af1f4..664c595 100644
--- a/GPU_puzzlers.ipynb
+++ b/GPU_puzzlers.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b3a1d4ec",
+ "id": "1ce202ea",
"metadata": {
"lines_to_next_cell": 2
},
@@ -13,7 +13,7 @@
},
{
"cell_type": "markdown",
- "id": "37f7c48d",
+ "id": "4135e7ae",
"metadata": {},
"source": [
"![](https://github.com/srush/GPU-Puzzles/raw/main/cuda.png)"
@@ -21,7 +21,7 @@
},
{
"cell_type": "markdown",
- "id": "4a1483d5",
+ "id": "b949c335",
"metadata": {},
"source": [
"GPU architectures are critical to machine learning, and seem to be\n",
@@ -32,7 +32,7 @@
},
{
"cell_type": "markdown",
- "id": "e6a24d29",
+ "id": "8691a1c9",
"metadata": {},
"source": [
"This notebook is an attempt teach beginner GPU programming in a\n",
@@ -48,7 +48,7 @@
},
{
"cell_type": "markdown",
- "id": "d00e04a6",
+ "id": "e0eb5ece",
"metadata": {},
"source": [
"[NUMBA CUDA Guide](https://numba.readthedocs.io/en/stable/cuda/index.html)"
@@ -56,7 +56,7 @@
},
{
"cell_type": "markdown",
- "id": "839109b0",
+ "id": "8152cc7d",
"metadata": {},
"source": [
"I recommend doing these in Colab, as it is easy to get started. Be\n",
@@ -66,7 +66,7 @@
},
{
"cell_type": "markdown",
- "id": "f5e23508",
+ "id": "0e25bdf4",
"metadata": {},
"source": [
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/srush/GPU-Puzzles/blob/main/GPU_puzzlers.ipynb)"
@@ -74,7 +74,7 @@
},
{
"cell_type": "markdown",
- "id": "c8686057",
+ "id": "f88648f7",
"metadata": {},
"source": [
"(If you are into this style of puzzle, also check out my [Tensor\n",
@@ -84,13 +84,13 @@
{
"cell_type": "code",
"execution_count": 1,
- "id": "8aceb7c1",
+ "id": "d0b892a8",
"metadata": {
"execution": {
- "iopub.execute_input": "2022-07-14T22:43:33.374864Z",
- "iopub.status.busy": "2022-07-14T22:43:33.374385Z",
- "iopub.status.idle": "2022-07-14T22:43:44.399614Z",
- "shell.execute_reply": "2022-07-14T22:43:44.398524Z"
+ "iopub.execute_input": "2022-07-14T22:45:52.112973Z",
+ "iopub.status.busy": "2022-07-14T22:45:52.112485Z",
+ "iopub.status.idle": "2022-07-14T22:46:03.017286Z",
+ "shell.execute_reply": "2022-07-14T22:46:03.016253Z"
},
"lines_to_next_cell": 2
},
@@ -103,13 +103,13 @@
{
"cell_type": "code",
"execution_count": 2,
- "id": "544e6de2",
+ "id": "20cdc047",
"metadata": {
"execution": {
- "iopub.execute_input": "2022-07-14T22:43:44.404160Z",
- "iopub.status.busy": "2022-07-14T22:43:44.403625Z",
- "iopub.status.idle": "2022-07-14T22:43:44.869383Z",
- "shell.execute_reply": "2022-07-14T22:43:44.868542Z"
+ "iopub.execute_input": "2022-07-14T22:46:03.021678Z",
+ "iopub.status.busy": "2022-07-14T22:46:03.021236Z",
+ "iopub.status.idle": "2022-07-14T22:46:03.490615Z",
+ "shell.execute_reply": "2022-07-14T22:46:03.489694Z"
}
},
"outputs": [],
@@ -123,13 +123,13 @@
{
"cell_type": "code",
"execution_count": 3,
- "id": "3a09bf8a",
+ "id": "7c5c7f63",
"metadata": {
"execution": {
- "iopub.execute_input": "2022-07-14T22:43:44.873754Z",
- "iopub.status.busy": "2022-07-14T22:43:44.873176Z",
- "iopub.status.idle": "2022-07-14T22:43:44.877853Z",
- "shell.execute_reply": "2022-07-14T22:43:44.877121Z"
+ "iopub.execute_input": "2022-07-14T22:46:03.494840Z",
+ "iopub.status.busy": "2022-07-14T22:46:03.494283Z",
+ "iopub.status.idle": "2022-07-14T22:46:03.499052Z",
+ "shell.execute_reply": "2022-07-14T22:46:03.498298Z"
},
"lines_to_next_cell": 2
},
@@ -142,7 +142,7 @@
},
{
"cell_type": "markdown",
- "id": "fc57e62f",
+ "id": "b5c99129",
"metadata": {},
"source": [
"## Puzzle 1: Map"
@@ -150,7 +150,7 @@
},
{
"cell_type": "markdown",
- "id": "48f6fb53",
+ "id": "3c54fe31",
"metadata": {
"lines_to_next_cell": 2
},
@@ -161,7 +161,7 @@
},
{
"cell_type": "markdown",
- "id": "59fb2818",
+ "id": "e6b92337",
"metadata": {
"lines_to_next_cell": 2
},
@@ -176,7 +176,7 @@
},
{
"cell_type": "markdown",
- "id": "a46c5ba6",
+ "id": "5dcccbef",
"metadata": {},
"source": [
"*Tip: Think of the function `call` as being run 1 time for each thread.\n",
@@ -186,13 +186,13 @@
{
"cell_type": "code",
"execution_count": 4,
- "id": "a628efb5",
+ "id": "20194e13",
"metadata": {
"execution": {
- "iopub.execute_input": "2022-07-14T22:43:44.881971Z",
- "iopub.status.busy": "2022-07-14T22:43:44.881539Z",
- "iopub.status.idle": "2022-07-14T22:43:44.953951Z",
- "shell.execute_reply": "2022-07-14T22:43:44.953150Z"
+ "iopub.execute_input": "2022-07-14T22:46:03.503191Z",
+ "iopub.status.busy": "2022-07-14T22:46:03.502734Z",
+ "iopub.status.idle": "2022-07-14T22:46:03.575110Z",
+ "shell.execute_reply": "2022-07-14T22:46:03.574334Z"
}
},
"outputs": [
@@ -215,45 +215,45 @@
""
],
"text/plain": [
- "Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Rectangle(width=11.616000000000001, height=12.936255200000002, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ "Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Rectangle(width=11.616000000000001, height=12.936255200000002, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -5.643127600000001), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=0, height=1.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -5.643127600000001), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=0, height=1.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.75), diagram=Primitive(shape=Text(text='Map', font_size=1), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.2501), diagram=Primitive(shape=Spacer(width=0, height=1), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.2500999999999998), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -1.6500000000000001,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 1.1,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 2.2,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 3.3000000000000003,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0)))))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.2500999999999998), diagram=Primitive(shape=Spacer(width=0, height=1), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 7.380166), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -3.5,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=1, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -3.5,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=1, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 3.5,\n",
" 0.0, 1.0, 0.0), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, 0.5000499999999999), diagram=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -2.5,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, 0.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('a', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.5000499999999999), diagram=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -2.5,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, 0.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('a', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyName(dname=('a', 1), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.0)))), diagram2=ApplyName(dname=('a', 2), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.0)))), diagram2=ApplyName(dname=('a', 3), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='a', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='a', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Spacer(width=0, height=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 1.5,\n",
" 0.0, 1.0, 0.0), diagram=Primitive(shape=Spacer(width=2.0, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
@@ -262,16 +262,16 @@
" 0.0, 1.0, 0.0), diagram=Primitive(shape=Spacer(width=2.0, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 5.0,\n",
" 0.0, 1.0, 0.0), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, 0.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('out', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('out', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyName(dname=('out', 1), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.0)))), diagram2=ApplyName(dname=('out', 2), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.0)))), diagram2=ApplyName(dname=('out', 3), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='out', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='out', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Spacer(width=0, height=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
- " 0.0, 1.0, 0.0)))))))), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty())), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty())), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty())), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty()))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -3.0000999999999998), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=0, height=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0)))))))), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty())), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty())), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty())), diagram2=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=Empty()), diagram2=Empty()))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -3.0000999999999998), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=0, height=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.25), diagram=ApplyStyle(style=Style(line_width=(, 0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='Block 0 0', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
@@ -312,13 +312,13 @@
{
"cell_type": "code",
"execution_count": 5,
- "id": "706ad044",
+ "id": "43e8b0de",
"metadata": {
"execution": {
- "iopub.execute_input": "2022-07-14T22:43:44.958532Z",
- "iopub.status.busy": "2022-07-14T22:43:44.958067Z",
- "iopub.status.idle": "2022-07-14T22:43:45.505018Z",
- "shell.execute_reply": "2022-07-14T22:43:45.504169Z"
+ "iopub.execute_input": "2022-07-14T22:46:03.579703Z",
+ "iopub.status.busy": "2022-07-14T22:46:03.579217Z",
+ "iopub.status.idle": "2022-07-14T22:46:04.129266Z",
+ "shell.execute_reply": "2022-07-14T22:46:04.128411Z"
},
"lines_to_end_of_cell_marker": 0,
"lines_to_next_cell": 1
@@ -340,7 +340,7 @@
},
{
"cell_type": "markdown",
- "id": "bbb4c6b7",
+ "id": "dc0d76d1",
"metadata": {},
"source": [
"## Puzzle 2 - Zip"
@@ -348,7 +348,7 @@
},
{
"cell_type": "markdown",
- "id": "327484b4",
+ "id": "e8b2678e",
"metadata": {},
"source": [
"Implement a kernel that adds together each position of `a` and `b` and stores it in `out`.\n",
@@ -358,13 +358,13 @@
{
"cell_type": "code",
"execution_count": 6,
- "id": "1dd99ff5",
+ "id": "fb0747f4",
"metadata": {
"execution": {
- "iopub.execute_input": "2022-07-14T22:43:45.509211Z",
- "iopub.status.busy": "2022-07-14T22:43:45.508732Z",
- "iopub.status.idle": "2022-07-14T22:43:45.586188Z",
- "shell.execute_reply": "2022-07-14T22:43:45.585444Z"
+ "iopub.execute_input": "2022-07-14T22:46:04.133505Z",
+ "iopub.status.busy": "2022-07-14T22:46:04.133027Z",
+ "iopub.status.idle": "2022-07-14T22:46:04.210843Z",
+ "shell.execute_reply": "2022-07-14T22:46:04.210061Z"
},
"lines_to_next_cell": 0
},
@@ -388,56 +388,56 @@
""
],
"text/plain": [
- "Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Rectangle(width=11.616000000000001, height=22.3742552, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ "Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Rectangle(width=11.616000000000001, height=22.3742552, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -10.3621276), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=0, height=1.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -10.3621276), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=0, height=1.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.75), diagram=Primitive(shape=Text(text='Zip', font_size=1), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.2501), diagram=Primitive(shape=Spacer(width=0, height=1), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.2500999999999998), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -1.6500000000000001,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 1.1,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 2.2,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 3.3000000000000003,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=0.7, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Circle(radius=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Image(local_path='robot.png', url_path='https://raw.githubusercontent.com/minitorch/diagrams/main/robot.png'), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0008333333333333334, 0.0, 0.0,\n",
" 0.0, 0.0008333333333333334, 0.0)))))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.2500999999999998), diagram=Primitive(shape=Spacer(width=0, height=1), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 11.670166), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
- " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -3.5,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=1, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Empty(), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -3.5,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Primitive(shape=Spacer(width=1, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 3.5,\n",
" 0.0, 1.0, 0.0), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, 0.5000499999999999), diagram=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -2.5,\n",
- " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -3.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('a', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.5000499999999999), diagram=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -2.5,\n",
+ " 0.0, 1.0, -0.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -3.0), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('a', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyName(dname=('a', 1), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.0)))), diagram2=ApplyName(dname=('a', 2), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.0)))), diagram2=ApplyName(dname=('a', 3), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='a', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='a', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Spacer(width=0, height=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.0), diagram=Primitive(shape=Spacer(width=2.0, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(0.0, 1.0, 0.0,\n",
" -1.0, 0.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 0.0,\n",
- " 0.0, 1.0, 6.5), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('b', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 6.5), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('b', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyName(dname=('b', 1), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.0)))), diagram2=ApplyName(dname=('b', 2), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.0)))), diagram2=ApplyName(dname=('b', 3), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='b', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='b', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=Primitive(shape=Spacer(width=0, height=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 1.5,\n",
" 0.0, 1.0, 0.0), diagram=Primitive(shape=Spacer(width=2.0, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
@@ -446,16 +446,16 @@
" 0.0, 1.0, 0.0), diagram=Primitive(shape=Spacer(width=2.0, height=0), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, 5.0,\n",
" 0.0, 1.0, 0.0), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, 0.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('out', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, 0.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.05), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
+ " 0.0, 1.0, -1.5), diagram=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Compose(envelope=, diagram1=Empty(), diagram2=ApplyName(dname=('out', 0), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 0.0)))), diagram2=ApplyName(dname=('out', 1), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 1.0)))), diagram2=ApplyName(dname=('out', 2), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 2.0)))), diagram2=ApplyName(dname=('out', 3), diagram=Primitive(shape=Rectangle(width=1, height=1, radius=None), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
" 0.0, 1.0, 3.0)))))), diagram2=ApplyTransform(transform=Affine(1.0, 0.0, -0.0,\n",
- " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(, 0.0), line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), diagram=ApplyStyle(style=Style(line_width=None, line_color=None, fill_color=, fill_opacity=None, dashing=None, output_size=None), diagram=Primitive(shape=Text(text='out', font_size=0.5), style=Style(line_width=None, line_color=None, fill_color=None, fill_opacity=None, dashing=None, output_size=None), transform=Affine(1.0, 0.0, 0.0,\n",
+ " 0.0, 1.0, -2.25), diagram=Compose(envelope=, diagram1=ApplyStyle(style=Style(line_width=(