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

Before Change


        return "const double _gsl_{var}_f{ind}".format(var=var, ind=ind)

    def write_dataholder(self, var):
        try:
            var_obj = self.variables[var]
        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:

After Change


        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):
        to_replace = {}
        for var_obj in variables_in_vector:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

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: enthought/chaco
Commit Name: 449fb9fcb6a6e9935e275a140ea3efb9c2e8de61
Time: 2013-05-16
Author: cwebster@enthought.com
File Name: chaco/array_plot_data.py
Class Name: ArrayPlotData
Method Name: set_data


Project Name: mil-tokyo/webdnn
Commit Name: 634c2049b8f95c45495811197346964e0826df2e
Time: 2018-11-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/backend/interface/generator.py
Class Name:
Method Name: generate_descriptor


Project Name: alfredfrancis/ai-chatbot-framework
Commit Name: d68beca6f553622b92f2709cf984023dbf284e98
Time: 2016-12-23
Author: alfred.francis@pearldatadirect.com
File Name: core/intentClassifier.py
Class Name: IntentClassifier
Method Name: predict