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
return allocate_yvector + "\n" + ("\n").join(fill_yvector) + "\n" + ("\n").join(empty_yvector)
def write_dataholder(self, variables_in_vector):
end_statement = self.get_syntax("end_statement")
open_struct = self.get_syntax("open_struct")
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: interactiveaudiolab/nussl
Commit Name: ae454df2f747d1a630a70a7d1fb528f927b29ea4
Time: 2020-05-14
Author: abugler@gmail.com
File Name: nussl/datasets/transforms.py
Class Name:
Method Name: _pitch_shift
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: interactiveaudiolab/nussl
Commit Name: 478d440f0902562314e6780f1b694ae48084f002
Time: 2020-04-23
Author: abugler@gmail.com
File Name: nussl/datasets/transforms.py
Class Name:
Method Name: _pitch_shift