Skip to content

Commit

Permalink
Fix typos sefl and Singelton
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKleine committed Oct 19, 2023
1 parent 74a0fee commit e69c944
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions dace/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def ordered(self) -> bool:

@property
@abstractmethod
def unique(sefl) -> bool:
def unique(self) -> bool:
"""
True if coordinate in the level are unique, False otw.
Expand All @@ -588,21 +588,21 @@ def unique(sefl) -> bool:

@property
@abstractmethod
def branchless(sefl) -> bool:
def branchless(self) -> bool:
"""
True if the level doesn't branch, false otw.
A level is considered branchless if no coordinate has a sibling (another
coordinate with same ancestor) and all coordinates in parent level have
a child. In other words if there is a bijection between the coordinates
in this level and the parent level. An example of the is the Singelton
in this level and the parent level. An example of the is the Singleton
index level in the COO format.
"""
pass

@property
@abstractmethod
def compact(sefl) -> bool:
def compact(self) -> bool:
"""
True if the level is compact, false otw.
Expand Down Expand Up @@ -661,11 +661,11 @@ def unique(self) -> bool:
return self._unique

@property
def branchless(sefl) -> bool:
def branchless(self) -> bool:
return False

@property
def compact(sefl) -> bool:
def compact(self) -> bool:
return True

def __init__(self, ordered: bool = True, unique: bool = True):
Expand Down Expand Up @@ -728,11 +728,11 @@ def unique(self) -> bool:
return self._unique

@property
def branchless(sefl) -> bool:
def branchless(self) -> bool:
return False

@property
def compact(sefl) -> bool:
def compact(self) -> bool:
return True

def __init__(self,
Expand Down Expand Up @@ -766,7 +766,7 @@ def __repr__(self) -> str:
return s


class Singelton(TensorIndex):
class Singleton(TensorIndex):
"""
Tensor index that encodes a single coordinate per parent coordinate.
Expand Down Expand Up @@ -804,11 +804,11 @@ def unique(self) -> bool:
return self._unique

@property
def branchless(sefl) -> bool:
def branchless(self) -> bool:
return True

@property
def compact(sefl) -> bool:
def compact(self) -> bool:
return True

def __init__(self,
Expand All @@ -825,7 +825,7 @@ def fields(self, lvl: int, dummy_symbol: symbolic.SymExpr) -> Dict[str, Data]:
})

def __repr__(self) -> str:
s = "Singelton"
s = "Singleton"

non_defaults = []
if self._full:
Expand Down Expand Up @@ -879,11 +879,11 @@ def unique(self) -> bool:
return self._unique

@property
def branchless(sefl) -> bool:
def branchless(self) -> bool:
return False

@property
def compact(sefl) -> bool:
def compact(self) -> bool:
return False

def __init__(self, ordered: bool = True, unique: bool = True):
Expand Down Expand Up @@ -946,11 +946,11 @@ def unique(self) -> bool:
return self._unique

@property
def branchless(sefl) -> bool:
def branchless(self) -> bool:
return True

@property
def compact(sefl) -> bool:
def compact(self) -> bool:
return False

def __init__(self, ordered: bool = True, unique: bool = True):
Expand Down Expand Up @@ -1032,7 +1032,7 @@ def __init__(
(M, N),
[
(dace.data.Compressed(unique=False), 0),
(dace.data.Singelton(), 1),
(dace.data.Singleton(), 1),
],
nnz,
"CSC_Matrix",
Expand Down Expand Up @@ -1063,8 +1063,8 @@ def __init__(
(I, J, K),
[
(dace.data.Compressed(unique=False), 0),
(dace.data.Singelton(unique=False), 1),
(dace.data.Singelton(), 2),
(dace.data.Singleton(unique=False), 1),
(dace.data.Singleton(), 2),
],
nnz,
"COO_3D_Tensor",
Expand Down
4 changes: 2 additions & 2 deletions tests/sdfg/data/tensor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def test_coo_fields():
(I, J, K),
[
(dace.data.Compressed(unique=False), 0),
(dace.data.Singelton(unique=False), 1),
(dace.data.Singelton(), 2),
(dace.data.Singleton(unique=False), 1),
(dace.data.Singleton(), 2),
],
nnz,
"COO_3D_Tensor",
Expand Down

0 comments on commit e69c944

Please sign in to comment.