@@ -23,7 +23,7 @@ def get_config_var(name):
2323 else :
2424 ext = get_config_var ('SO' )
2525
26- fullpath = os .path .join (basedir , '_libsdm' + ext )
26+ fullpath = os .path .join (basedir , '_libsdm' + ext )
2727 if not os .path .isfile (fullpath ):
2828 fullpath = os .path .join (basedir , '_libsdm.so' )
2929
@@ -65,7 +65,7 @@ def _multK(value, K):
6565def opencl_worksize_mult16 (address_space ):
6666 local_worksize = _multK (address_space .bs_len , 16 )
6767 mcu = address_space .opencl_opts .max_compute_units
68- global_worksize = _multK (address_space .sample // 20 , 2 * mcu * local_worksize )
68+ global_worksize = _multK (address_space .sample // 20 , 2 * mcu * local_worksize )
6969 return local_worksize , global_worksize
7070
7171
@@ -74,7 +74,7 @@ def opencl_worksize_power2(address_space):
7474 while local_worksize < address_space .bs_len :
7575 local_worksize *= 2
7676 mcu = address_space .opencl_opts .max_compute_units
77- global_worksize = _multK (address_space .sample // 20 , 2 * mcu * local_worksize )
77+ global_worksize = _multK (address_space .sample // 20 , 2 * mcu * local_worksize )
7878 return local_worksize , global_worksize
7979
8080
@@ -563,19 +563,19 @@ def write(self, addr, datum, radius=None, weight=1):
563563 if isinstance (weight , int ):
564564 libsdm .sdm_write2_weighted (pointer (self ), addr .bs_data , c_uint (radius ), datum .bs_data , c_int (weight ))
565565 elif isinstance (weight , (list , tuple )):
566- assert (self .bits + 1 == len (weight ))
566+ assert (self .bits + 1 == len (weight ))
567567 # See https://docs.python.org/3/library/ctypes.html#type-conversions
568- weight_buf = (c_int * (self .bits + 1 ))(* weight )
568+ weight_buf = (c_int * (self .bits + 1 ))(* weight )
569569 libsdm .sdm_write2_weighted_table (pointer (self ), addr .bs_data , c_uint (radius ), datum .bs_data , weight_buf )
570570 else :
571571 raise NotImplemented
572572
573- #def write_sub(self, addr, datum, radius=None):
574- # ''' Write a bitstring to the SDM.
575- # '''
576- # if radius is None:
577- # radius = self.radius
578- # libsdm.sdm_write_sub(pointer(self), addr.bs_data, c_uint(radius), datum.bs_data)
573+ # def write_sub(self, addr, datum, radius=None):
574+ # ''' Write a bitstring to the SDM.
575+ # '''
576+ # if radius is None:
577+ # radius = self.radius
578+ # libsdm.sdm_write_sub(pointer(self), addr.bs_data, c_uint(radius), datum.bs_data)
579579
580580 def write_random_bitstrings (self , n ):
581581 for _ in range (n ):
0 commit comments