e22ec775fbde41968ca64ba2ed0e09e8f5cf687d,brian2/codegen/generators/GSL_generator.py,GSLCodeGenerator,get_dimension_code,#GSLCodeGenerator#Any#,69
Before Change
def diff_var_to_replace(self, diff_vars):
raise NotImplementedError
def get_dimension_code(self, diff_num):
raise NotImplementedError
def yvector_code(self, diff_vars):
raise NotImplementedError
def write_dataholder_single(self, var_obj):
raise NotImplementedError
After Change
return to_replace
def get_dimension_code(self, diff_num):
start_function = self.get_syntax("start_function")
open_function = self.get_syntax("open_function")
end_statement = self.get_syntax("end_statement")
end_function = self.get_syntax("end_function")
code = "\n{start_function}int set_dimension(size_t * dimension){open_function}".format(start_function=start_function,
open_function=open_function)
code += "\n\tdimension[0] = {diff_num}{end_statement}".format(diff_num=diff_num, end_statement=end_statement)
code += "\n\treturn GSL_SUCCESS{end_statement}\n".format(end_statement=end_statement)
code += end_function
return code
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: get_dimension_code
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
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