Revision 7af471fabebe12034c561ad6071bcab2eaeeaef7 authored by Andrew Adams on 12 October 2023, 18:47:40 UTC, committed by Andrew Adams on 12 October 2023, 18:47:40 UTC
1 parent 6a3fe1e
Raw File
StmtToViz_stylesheet.template.html
<style type='text/css'>
    /* General CSS Rules*/
    body {
        font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
        font-size: 12px;
        background: #f8f8f8;
        margin-left: 15px;
    }

    div#page-container {
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    a,
    a:hover,
    a:visited,
    a:active {
        color: inherit;
        text-decoration: none;
    }

    b {
        font-weight: normal;
    }

    table {
        font-size: 12px;
    }

    /* Visualization tabs */
    div#visualization-tabs {
        display: flex;
        flex-grow: 1;
        width: 100%;
        overflow: hidden;
        border-top: 1px solid rgb(200, 200, 200)
    }

    div#ir-code-tab {
        counter-reset: line;
        padding-left: 50px;
        padding-top: 20px;
        overflow-y: scroll;
        position: relative;
    }

    div#ir-visualization-tab {
        overflow-y: scroll;
        padding-top: 20px;
        padding-left: 20px;
        position: relative;
    }

    div#assembly-tab {
        overflow-y: scroll;
        padding-top: 20px;
        padding-left: 20px;
        position: relative;
    }

    button#highlight-button {
      margin: 0.4em;
      padding: 0.5em;
      border-radius: 4px;
    }


    /* Resize bars */
    div#visualization-tabs div.resize-bar {
        background: rgb(201, 231, 190);
        cursor: col-resize;
        border-left: 1px solid rgb(0, 0, 0);
        border-right: 1px solid rgb(0, 0, 0);
    }

        div#visualization-tabs div.resize-bar div.collapse-btns {
            position: relative;
            top: 50%;
        }

        div#visualization-tabs div.resize-bar div.collapse-btns {
            margin: 0px;
        }

    button.resize-btn {
        margin: 10px 3px;
        font-size: 18px;
    }

    /* IR Code Section CSS */
    b.Highlight {
        font-weight: bold;
        background-color: #DDD;
    }

    span.Highlight {
        font-weight: bold;
        background-color: #FF0;
    }

    span.OpF32 {
        color: hsl(106deg 100% 40%);
        font-weight: bold;
    }

    span.OpF64 {
        color: hsl(106deg 100% 30%);
        font-weight: bold;
    }

    span.OpB8 {
        color: hsl(208deg 100% 80%);
        font-weight: bold;
    }

    span.OpB16 {
        color: hsl(208deg 100% 70%);
        font-weight: bold;
    }

    span.OpB32 {
        color: hsl(208deg 100% 60%);
        font-weight: bold;
    }

    span.OpB64 {
        color: hsl(208deg 100% 50%);
        font-weight: bold;
    }

    span.OpI8 {
        color: hsl(46deg 100% 45%);
        font-weight: bold;
    }

    span.OpI16 {
        color: hsl(46deg 100% 40%);
        font-weight: bold;
    }

    span.OpI32 {
        color: hsl(46deg 100% 34%);
        font-weight: bold;
    }

    span.OpI64 {
        color: hsl(46deg 100% 27%);
        font-weight: bold;
    }

    span.OpVec2 {
        background-color: hsl(100deg 100% 90%);
        font-weight: bold;
    }

    span.OpVec4 {
        background-color: hsl(100deg 100% 80%);
        font-weight: bold;
    }

    span.Memory {
        color: #d22;
        font-weight: bold;
    }

    span.Pred {
        background-color: #ffe8bd;
        font-weight: bold;
    }

    span.Label {
        background-color: #bde4ff;
        font-weight: bold;
    }

    div.show-hide-btn-wrapper {
        position: relative;
        width: 0;
        height: 0;
    }

    div.show-hide-btn {
        position: absolute;
        left: -14px;
        top: 4px;
        font-size: 8pt;
    }

        div.show-hide-btn:hover {
            color: #c30000;
        }

    button.icon-btn {
        border: 0px;
        background: transparent;
        color: black;
        font-size: 11pt;
        display: inline-block;
        vertical-align: middle;
        margin-right: 5px;
        margin-left: 5px;
        padding: 0px;
    }

    div#ir-visualization-tab button.icon-btn {
        margin-left: 1px;
    }

    button.icon-btn:hover {
        color: #c30000;
    }

    code.ptx {
        tab-size: 26;
        white-space: pre;
    }

    div.indent {
        padding-left: 15px;
    }

    span.comment {
        color: #998;
        font-style: italic;
    }

    span.keyword {
        color: #333;
        font-weight: bold;
    }

    span.IntImm {
        color: #099;
    }

    span.UIntImm {
        color: #099;
    }

    span.FloatImm {
        color: #099;
    }

    span.StringImm {
        color: #d14;
    }

    span.Type {
        color: #445588;
        font-weight: bold;
    }

    span.Symbol {
        color: #990073;
    }

    span.Assign {
        color: #d14;
        font-weight: bold;
    }

    div.WrapLine {
        margin-left: 30px;
        text-indent: -30px;
    }

    span.IfSpan,
    span.ClosingBrace,
    div.Module,
    div.WrapLine,
    div.Consumer,
    div.Produce,
    div.For,
    div.Evaluate,
    div.Allocate,
    div.Function {
        counter-increment: line;
    }

        span.IfSpan:before,
        span.ClosingBrace:before,
        div.WrapLine:before,
        div.Consumer:before,
        div.Produce:before,
        div.For:before,
        div.Evaluate:before,
        div.Allocate:before,
        div.Module:before,
        div.Function:before {
            content: counter(line) '. ';
            display: inline-block;
            position: absolute;
            left: 0px;
            color: rgb(175, 175, 175);
            user-select: none;
            -webkit-user-select: none;
        }

        div.WrapLine:before {
            left: 30px;
        }

    .collapsed-block {
        position: absolute;
        left: -9999px;
        max-height: 0px;
        overflow: hidden;
        opacity: 0;
    }

    /* IR Viz Section CSS */
    .collapsed-viz {
        display: none;
    }

    div.fn-wrapper {
        background-color: #f0f0f0;
        border: 1px dashed grey;
        margin-bottom: 15px;
        width: max-content;
    }

    div.fn-header {
        display: flex;
        font-weight: bold;
        padding: 5px 7px;
        background-color: #dfdede;
    }

    span.fn-title {
        margin-right: 10px;
        margin-left: 3px;
    }

    div.fn-body {
        padding: 7px;
    }

    div.fn-call {
        padding: 3px 5px;
        background: #f1daeb;
        border: 1px dashed gray;
    }

    div.box {
        border: 1px dashed grey;
        width: max-content;
        min-width: -webkit-fill-available;
        display: flex;
        flex-direction: column;
    }

        div.box:not(:last-child) {
            margin-bottom: 15px;
        }

    div.box-header {
        padding: 5px 7px;
        display: flex;
    }

    div.box-title {
        font-weight: bold;
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 3px;
    }

    div.viz-cost-btns {
        margin: auto 0px auto auto;
        display: flex;
        padding-left: 10px;
    }

        div.viz-cost-btns div {
            width: 10px;
            height: 17.02px;
            border: 1px solid gray;
        }

            div.viz-cost-btns div:hover {
                border: 1px solid black;
            }

    div.box-body {
        padding: 7px;
    }

    div.ProducerBox {
        background-color: #e9fbe4;
    }

        div.ProducerBox > div.box-header {
            background-color: #c6edbb;
        }

    div.ConsumerBox {
        background-color: #ffe6e8;
    }

        div.ConsumerBox > div.box-header {
            background-color: #f1c8cc;
        }

    div.ForBox {
        background-color: #f0e9f9;
    }

        div.ForBox > div.box-header {
            background-color: #ddc6fb;
        }

    div.IfBox {
        background-color: #e6eeff;
    }

        div.IfBox > div.box-header {
            background-color: #c0d4ff;
        }

    div.AllocateBox {
        background-color: #f4f8bf;
    }

        div.AllocateBox > div.box-header {
            background-color: #f5e790;
        }

    div.LoadBox {
        background-color: #fff4e6;
    }

        div.LoadBox > div.box-header {
            background-color: #fbe3c6;
        }

    div.StoreBox {
        background-color: #ddf3e9;
    }

        div.StoreBox > div.box-header {
            background-color: #bcedd6;
        }

    .if-root-node {
        width: 200px !important;
        border: 1px dashed gray !important;
        text-align: center;
        padding: 3px !important;
        background: #c0d4ff;
    }

    .allocate-table {
        background-color: rgba(197, 195, 195, 0.2);
        min-width: -webkit-fill-available;
    }

        .allocate-table:not(:last-child) {
            margin-bottom: 10px;
        }

        .allocate-table td, .allocate-table th {
            padding: 5px;
            border: 1px dashed gray;
        }

    button.trunc-cond {
        font-size: 12px;
        vertical-align: middle;
        padding: 0px;
        line-height: 1.5;
        background: none;
        border: none;
    }

    span.tooltip {
        opacity: 1;
        visibility: hidden;
        position: relative;
        left: 50px;
        top: -10px;
        width: max-content;
        padding: 8px;
        background: #fff7e0;
        font-size: 12px;
        border-radius: 5px;
        border: 1px solid #aaa;
        z-index: 9999;
        box-shadow: rgba(100, 100, 100, 0.8) 0 2px 5px 0;
        text-indent: 0px;
    }

    div.cost-btn:hover span.tooltip {
        visibility: visible;
    }

    .conditionTooltip {
        width: 300px;
        padding: 5px;
        font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    }

    /* TreeFlex CSS */
    .tf-tree {
        overflow: unset;
    }

        .tf-tree ul {
            width: -webkit-fill-available;
        }

    .tf-custom-ir-viz li {
        padding: 0px !important;
        flex-grow: 1;
    }

    .tf-tree.tf-gap-sm li > .tf-nc:after, .tf-tree.tf-gap-sm li > .tf-node-content:after {
        /*height: 1em;*/
    }

    .tf-custom-ir-viz {
        font-size: 12px;
    }

        .tf-custom-ir-viz:not(:last-child) {
            margin-bottom: 15px;
        }

        .tf-custom-ir-viz .tf-nc {
            border: none;
            margin: 0px;
            padding: 0px;
            width: -webkit-fill-available;
        }

            .tf-custom-ir-viz .tf-nc:before,
            .tf-custom-ir-viz .tf-nc:after {
                border-left-width: 1px;
            }

        .tf-custom-ir-viz li:not(:first-child) > .if-node {
            padding-left: 8px !important;
        }

        .tf-custom-ir-viz li li:before {
            border-top-width: 1px;
        }

        .tf-custom-ir-viz .end-node {
            border-style: dashed;
        }

    /* Cost model */

    div.node-cost {
        position: absolute;
        left: 35px;
        display: flex;
    }
    div.cost-btn {
        width: 15px;
        height: 14px;
        margin-top: 2px;
    }

        div.cost-btn:not(:last-child) {
            margin-right: 3px;
            margin-right: 3px;
        }

        div.cost-btn:hover {
            cursor: pointer;
            border: 1px solid lightgray;
        }

    .CostColor19 {
        background-color: rgb(130, 31, 27);
    }

    .CostColor18 {
        background-color: rgb(145, 33, 30);
    }

    .CostColor17 {
        background-color: rgb(160, 33, 32);
    }

    .CostColor16 {
        background-color: rgb(176, 34, 34);
    }

    .CostColor15 {
        background-color: rgb(185, 47, 32);
    }

    .CostColor14 {
        background-color: rgb(193, 59, 30);
    }

    .CostColor13 {
        background-color: rgb(202, 71, 27);
    }

    .CostColor12 {
        background-color: rgb(210, 82, 22);
    }

    .CostColor11 {
        background-color: rgb(218, 93, 16);
    }

    .CostColor10 {
        background-color: rgb(226, 104, 6);
    }

    .CostColor9 {
        background-color: rgb(229, 118, 9);
    }

    .CostColor8 {
        background-color: rgb(230, 132, 15);
    }

    .CostColor7 {
        background-color: rgb(231, 146, 20);
    }

    .CostColor6 {
        background-color: rgb(232, 159, 25);
    }

    .CostColor5 {
        background-color: rgb(233, 172, 30);
    }

    .CostColor4 {
        background-color: rgb(233, 185, 35);
    }

    .CostColor3 {
        background-color: rgb(233, 198, 40);
    }

    .CostColor2 {
        background-color: rgb(232, 211, 45);
    }

    .CostColor1 {
        background-color: rgb(231, 223, 50);
    }

    .CostColor0 {
        background-color: rgb(236,233,89);
    }
</style>
back to top