a21b67aed967b3932019c8b0d266bf4098a55d2a,brian2/codegen/generators/GSL_generator.py,GSLCythonCodeGenerator,write_dataholder,#GSLCythonCodeGenerator#Any#,267
Before Change
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):
After Change
return "{dtype} {var}".format(dtype=dtype, var=var_obj.name)
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 = {}
for var_obj in variables_in_vector:
In pattern: SUPERPATTERN
Frequency: 3
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: kkroening/ffmpeg-python
Commit Name: 3cb952352ff0c937c1da3bf1d80142e0d8ee1e46
Time: 2017-05-25
Author: davide@depau.eu
File Name: ffmpeg/__init__.py
Class Name: _TrimNode
Method Name: _get_filter