a21b67aed967b3932019c8b0d266bf4098a55d2a,brian2/codegen/generators/GSL_generator.py,GSLCythonCodeGenerator,write_dataholder,#GSLCythonCodeGenerator#,267
Before Change
def write_dataholder(self, var_obj):
dtype = self.c_data_type(var_obj.dtype)
if isinstance(var_obj, ArrayVariable):
array_name = self.generator.get_array_name(var_obj)
return "{dtype}* {var}".format(dtype=dtype, var=array_name)
else:
return "{dtype} {var}".format(dtype=dtype, var=var_obj.name)
def get_replacer(self, var_obj, to_replace):
if isinstance(var_obj, ArrayVariable):
pointer_name = self.generator.get_array_name(var_obj)
to_replace[pointer_name] = "p." + pointer_name
After Change
def write_dataholder(self, variables_in_vector):
code = ["\ncdef struct dataholder:\n\tint _idx"]
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)]
return ("\n").join(code)
def to_replace_vector_vars(self, variables_in_vector, ignore=[]):
to_replace = {}

In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: brian-team/brian2
Commit Name: a21b67aed967b3932019c8b0d266bf4098a55d2a
Time: 2017-07-06
Author: charleetje@gmail.com
File Name: brian2/codegen/generators/GSL_generator.py
Class Name: GSLCythonCodeGenerator
Method Name: write_dataholder
Project Name: brian-team/brian2
Commit Name: 25ca9c249fd3e11bb166b42ffeb2433036964bd1
Time: 2017-07-05
Author: charleetje@gmail.com
File Name: brian2/codegen/generators/GSL_generator.py
Class Name: GSLWeaveCodeGenerator
Method Name: write_dataholder
Project Name: daavoo/pyntcloud
Commit Name: a2f318363a1c4dde386d7f7ac316baa706678b89
Time: 2017-03-09
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/pyntcloud.py
Class Name: PyntCloud
Method Name: get_sample
Project Name: daavoo/pyntcloud
Commit Name: f9b3bc145e981a05dd27abc8f2987692bf4d3b5c
Time: 2017-03-09
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/pyntcloud.py
Class Name: PyntCloud
Method Name: get_filter