25ca9c249fd3e11bb166b42ffeb2433036964bd1,brian2/codegen/generators/GSL_generator.py,GSLWeaveCodeGenerator,unpack_namespace,#GSLWeaveCodeGenerator#,377
Before Change
except:
var_obj = self.other_variables[var]
if isinstance(var_obj, ArrayVariable):
pointer_name = self.generator.get_array_name(var_obj, access_data=True)
array_name = self.generator.get_array_name(var_obj, access_data=False)
if in_vector:
return "p.{ptr} = {array};".format(ptr=pointer_name, array=array_name)
else:
return ""
else:
if in_vector:
After Change
return ""
def unpack_namespace(self, variables_in_vector, variables_in_scalar):
code = []
for var_obj in self.variables.values():
in_vector = var_obj in variables_in_vector
in_scalar = var_obj in variables_in_scalar
code += [self.unpack_namespace_single(var_obj, in_vector, in_scalar)]
return ("\n").join(code)
In pattern: SUPERPATTERN
Frequency: 3
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: unpack_namespace
Project Name: CamDavidsonPilon/lifelines
Commit Name: b46c893e2c0f9cd505b597c2ff215a0df04b6050
Time: 2020-05-19
Author: cam.davidson.pilon@gmail.com
File Name: lifelines/fitters/npmle.py
Class Name:
Method Name: log_likelihood
Project Name: senarvi/theanolm
Commit Name: 0a0688c0fd83165b428d1eafb1b6fb19e1674e29
Time: 2015-10-06
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/dictionary.py
Class Name: WordClass
Method Name: sample