Skip to content

Commit a209ddc

Browse files
author
Jessica Shi
committed
add help menu for level formats
1 parent 377b727 commit a209ddc

File tree

5 files changed

+54
-2
lines changed

5 files changed

+54
-2
lines changed

codegen.html

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
<script src="javascripts/FileSaver.min.js"></script>
2323
<script src="javascripts/parser.js"></script>
2424
<script src="javascripts/demo.js"></script>
25+
<script type="text/x-mathjax-config">
26+
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
27+
</script>
28+
<script type="text/javascript"
29+
src="http://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
30+
</script>
2531
</head>
2632
<body>
2733
<!-- Always shows a header, even in smaller screens. -->
@@ -79,14 +85,38 @@ <h6 style="margin-bottom: 0px; margin-top: 18px">Input a tensor algebra expressi
7985
<table class="mdl-data-table mdl-js-data-table" style="width: 100%; margin-bottom: 8px">
8086
<thead>
8187
<tr>
82-
<th class="mdl-data-table__cell--non-numeric" width="100"><div align="center" style="position:relative"><big>Tensor</big></div></th>
88+
<th class="mdl-data-table__cell--non-numeric" width="100">
89+
<div align="center" style="position:relative"><big>Tensor</big></div></th>
8390
<th class="mdl-data-table__cell--non-numeric" width="120px"
8491
style="padding-left: 0px">
8592
<div style="display:inline"><big>Format&nbsp;</big></div>
8693
</th>
8794
<th class="mdl-data-table__cell--non-numeric" style="padding-left: 7px">
8895
<div style="display:inline"><big>Level Formats&nbsp;</big></div>
89-
<div style="display:inline">(reorder dimensions by dragging the drop-down menus)</div>
96+
<div style="display:inline; margin-right:10px">(reorder dimensions by dragging the drop-down menus)</div>
97+
<div style="display:inline; vertical-align: middle">
98+
<button id="btnHelp" class="help-btn mdl-button mdl-js-button mdl-button--icon">
99+
<i class="material-icons" style="font-size:20px">help_outline</i>
100+
</button>
101+
<div id="helpMenu" class="help-menu mdl-menu mdl-js-menu mdl-js-ripple-effect" for="btnHelp">
102+
<p>
103+
<strong>Dense</strong> levels store the size of the dimension $(N)$ and encode the coordinates in the interval $[0, N)$.
104+
<img src="images/dense.png" class="centered-img" style="height: 35px">
105+
</p>
106+
<p>
107+
<strong>Sparse</strong> levels store coordinates in a segment of the $\texttt{crd}$ array, with segment bounds stored in the $\texttt{pos}$ array.
108+
<img src="images/sparse.png" class="centered-img" style="height: 60px">
109+
</p>
110+
<p>
111+
<strong>Singleton</strong> levels store individual coordinates (with no siblings) in the $\texttt{crd}$ array.
112+
<img src="images/singleton.png" class="centered-img" style="height: 40px">
113+
</p>
114+
<p>
115+
A level is <strong>unique (U)</strong> if no collection of coordinates that share the same ancestors contains duplicates, and it is <strong>not unique (&not;U)</strong> otherwise.
116+
</p>
117+
<p style="margin-bottom: 0"> More info on taco's tensor formats can be found <a href="http://tensor-compiler.org/chou-oopsla18-taco-formats.pdf">here</a>.</p>
118+
</div>
119+
</div>
90120
</th>
91121
</tr>
92122
</thead>

images/dense.png

6.53 KB
Loading

images/singleton.png

9.23 KB
Loading

images/sparse.png

19 KB
Loading

stylesheets/style.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,26 @@ a{
190190
.demo-btn {
191191
width: 100%;
192192
font-weight: 400;
193+
}
194+
195+
.help-btn {
196+
width: 22px;
197+
height: 22px;
198+
min-width: initial;
199+
}
200+
201+
.help-menu {
202+
padding: 10px;
203+
width: 360px;
204+
color: black;
205+
}
206+
207+
.help-menu p {
208+
white-space: initial;
209+
}
210+
211+
.centered-img {
212+
display: block;
213+
margin-left: auto;
214+
margin-right: auto;
193215
}

0 commit comments

Comments
 (0)