Skip to content

Commit 5aa7d8e

Browse files
committed
Merge branch 'wma/dense-alias' into wma/levels
2 parents 0391e5f + f04e675 commit 5aa7d8e

2 files changed

Lines changed: 55 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ Minutes from our meetings are available [here](https://hackmd.io/0qzK4fJlQp-78t0
55

66
## Specification
77

8-
The working version of the specification can be found under `spec/latest/index.bs`.
8+
[View Latest Spec](https://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/GraphBLAS/binsparse-specification/main/spec/latest/index.bs)
99

1010
### Editing
1111

12+
The working version of the specification can be found under `spec/latest/index.bs`.
13+
1214
The spec is written in [bikeshed](https://github.com/tabatkins/bikeshed) – a variant of markdown.
1315
To render the spec locally:
1416

1517
* Install bikeshed (ideally in an isolated environment): `pipx install bikeshed`
1618
* Call `bikeshed spec spec/latest/index.bs`
1719

20+
To render the spec online, see [api.csswg.org](https://api.csswg.org/bikeshed/),
21+
or use the following commands:
22+
23+
```
24+
cd binsparse-specification/spec/latest
25+
curl https://api.csswg.org/bikeshed/ -F file=@index.bs > index.html
26+
```
27+
1828
Rendered versions will generated for pull requests.

spec/latest/index.bs

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,43 @@ be present in the binary container. `number_of_elements` refers to the number
111111
of stored values, `number_of_rows` refers to the number of rows, and `number_of_columns`
112112
refers to the number of columns.
113113

114-
#### VEC #### {#vec_format}
114+
#### DVEC #### {#dvec_format}
115115

116-
Vector format
116+
Dense Vector format
117+
118+
: values
119+
:: Array of size `number_of_elements` containing stored values.
120+
121+
The element of the vector located at index `i` has scalar value
122+
`values[i]`.
123+
124+
#### DMATR #### {#dmatr_format}
125+
126+
Row-Major Dense Matrix format
127+
128+
: values
129+
:: Array of size `number_of_elements` containing stored values.
130+
131+
The element of the vector located at index `i, j` has scalar value
132+
`values[i * number_of_columns + j]`.
133+
134+
#### DMATC #### {#dmatc_format}
135+
136+
Column-Major Dense Matrix format
137+
138+
: values
139+
:: Array of size `number_of_elements` containing stored values.
140+
141+
The element of the vector located at index `i, j` has scalar value
142+
`values[j * number_of_rows + i]`.
143+
144+
#### DMAT #### {#DMAT_format}
145+
146+
DMAT format is an alias for [[#dmatr_format]] format.
147+
148+
#### CVEC #### {#cvec_format}
149+
150+
Compressed Sparse Vector format
117151

118152
: indices_0
119153
:: Array of size `number_of_elements` containing indices.
@@ -495,9 +529,14 @@ either in the values_type field or as wrapper levels around the element level.
495529

496530
### Complex Values (complex) ### {#complex_level}
497531

498-
When the values are composed of alternating real and imaginary components of
499-
complex numbers, we use a complex level to signal this modification to the
500-
underlying array.
532+
When a value array is composed of alternating real and imaginary components of
533+
complex numbers, the type is written as `complex[<type>]`. For example, a value
534+
array of complex `float64` would have a datatype of `complex[float64]` The real
535+
component of the `i`th element in the modified array shall be stored at position
536+
`2i` in the original array, and the imaginary component of the `i`th element in
537+
the modified array shall be at position `2i + 1` in the underlying array.
538+
The `complex` value modifier may only be used with the types `float32` and
539+
`float64`.
501540

502541
If the level key is "complex", the `subformat` key must be present. The
503542
complex level represents zero or more complex-valued arrays specified by

0 commit comments

Comments
 (0)