e22ec775fbde41968ca64ba2ed0e09e8f5cf687d,brian2/codegen/generators/GSL_generator.py,GSLCodeGenerator,write_dataholder,#GSLCodeGenerator#,75
Before Change
def write_dataholder_single(self, var_obj):
raise NotImplementedError
def write_dataholder(self, variables_in_vector):
raise NotImplementedError
def to_replace_vector_vars(self, variables_in_vector, ignore=[]):
raise NotImplementedError
def unpack_namespace_single(self, var_obj, in_vector, in_scalar):
raise NotImplementedError
After Change
end_struct = self.get_syntax("end_struct")
code = ["\n"+self.declare("struct", "dataholder") + open_struct]
code += ["\n\t"+self.declare("int", "_idx", in_struct=True) + end_statement]
for var_obj in variables_in_vector:
if var_obj.name == "t" or "_gsl" in var_obj.name:
continue
code += ["\t"+self.write_dataholder_single(var_obj)]
code += [end_struct]
return ("\n").join(code)
def find_undefined_variables(self, statements):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: brian-team/brian2
Commit Name: e22ec775fbde41968ca64ba2ed0e09e8f5cf687d
Time: 2017-07-10
Author: charleetje@gmail.com
File Name: brian2/codegen/generators/GSL_generator.py
Class Name: GSLCodeGenerator
Method Name: write_dataholder
Project Name: brian-team/brian2
Commit Name: e22ec775fbde41968ca64ba2ed0e09e8f5cf687d
Time: 2017-07-10
Author: charleetje@gmail.com
File Name: brian2/codegen/generators/GSL_generator.py
Class Name: GSLCodeGenerator
Method Name: write_dataholder
Project Name: nilmtk/nilmtk
Commit Name: 5c9286ef92a82a5c00ea30cc4710c72b713754d0
Time: 2014-01-07
Author: nipunreddevil@gmail.com
File Name: nilmtk/preprocessing/electricity/building.py
Class Name:
Method Name: filter_dates
Project Name: brian-team/brian2
Commit Name: e22ec775fbde41968ca64ba2ed0e09e8f5cf687d
Time: 2017-07-10
Author: charleetje@gmail.com
File Name: brian2/codegen/generators/GSL_generator.py
Class Name: GSLCodeGenerator
Method Name: to_replace_vector_vars