-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblock_backend.py
More file actions
38 lines (29 loc) · 814 Bytes
/
Copy pathblock_backend.py
File metadata and controls
38 lines (29 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from __future__ import annotations
import dataclasses
from typing import Literal
BlockBackendKind = Literal["dense_packed", "sparse12"]
@dataclasses.dataclass(frozen=True)
class DensePackedBlockDescriptor:
call_idx: int
snp_start: int
true_width: int
packed_width: int
storage: str = "tmpfile_packed"
kind: BlockBackendKind = "dense_packed"
@dataclasses.dataclass(frozen=True)
class Sparse12BlockDescriptor:
call_idx: int
snp_start: int
true_width: int
nnz_het: int = 0
nnz_hom: int = 0
has_csc: bool = False
has_csr: bool = False
idx_dtype: str = "int32"
storage: str = "host_sparse_metadata_compact"
kind: BlockBackendKind = "sparse12"
__all__ = [
"BlockBackendKind",
"DensePackedBlockDescriptor",
"Sparse12BlockDescriptor",
]