25ca9c249fd3e11bb166b42ffeb2433036964bd1,brian2/codegen/generators/GSL_generator.py,GSLWeaveCodeGenerator,write_dataholder,#GSLWeaveCodeGenerator#Any#,350

Before Change


        except:
            var_obj = self.other_variables[var]
        dtype = self.generator.c_data_type(var_obj.dtype)
        if isinstance(var_obj, ArrayVariable):
            pointer_name = self.generator.get_array_name(var_obj, access_data=True)
            restrict = self.generator.restrict
            if var_obj.scalar:
                restrict = ""
            return "{dtype}* {res} {var};".format(dtype=dtype, res=restrict, var=pointer_name)
        else:
            return "{dtype} {var};".format(dtype=dtype, var=var)

    def get_replacer(self, var, to_replace):
        try:
            var_obj = self.variables[var]
        except:

After Change



    def write_dataholder(self, variables_in_vector):
        code = ["\nstruct dataholder\n{\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)]
        code += ["\n};"]
        return ("\n").join(code)

    def to_replace_vector_vars(self, variables_in_vector):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


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: 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: pantsbuild/pants
Commit Name: 096b135b0b19f9425d97b1f77afb521f5b8584b5
Time: 2019-05-15
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: src/python/pants/backend/python/subsystems/python_native_code.py
Class Name: PythonNativeCode
Method Name: check_build_for_current_platform_only