a7963bd8bf7287fc287ca13c4483fda402ac55b0,dev/ideas/devices/cpp_standalone.py,,,#,12
Before Change
// Extract all the CodeObjects
// Here we hack it directly, as there are more general issues to solve before we can do this automatically
code_objects = [G.state_updater.codeobj,
G.resetter.codeobj,
G.thresholder.codeobj,
]
// Extract the array information
vars = G.variables
After Change
// Use a NeuronGroup to fake the whole process
G = NeuronGroup(N, eqs, reset=reset, threshold=threshold, refractory=refractory, name="gp")
G2 = NeuronGroup(1, eqs, reset=reset, threshold=threshold, refractory=refractory, name="gp2")
// Run the network for 0 seconds to generate the code
net = Network(G, G2)
net.run(0*second)
// Extract all the CodeObjects
// Note that since we ran the Network object, these CodeObjects will be sorted into the right
// running order, assuming that there is only one clock
code_objects = []
for obj in net.objects:
code_objects.extend(obj.code_objects)
// Extract the arrays information
vars = {}
for obj in net.objects:
if hasattr(obj, "variables"):
for k, v in obj.variables.iteritems():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: brian-team/brian2
Commit Name: a7963bd8bf7287fc287ca13c4483fda402ac55b0
Time: 2013-08-31
Author: dan.goodman@ens.fr
File Name: dev/ideas/devices/cpp_standalone.py
Class Name:
Method Name:
Project Name: pantsbuild/pants
Commit Name: e9bf50c354ed3d79a2dc6bd7354de2f9c5fd62c2
Time: 2015-07-27
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/codegen/tasks/test_ragel_gen.py
Class Name: RagelGenTest
Method Name: test_ragel_gen
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: f57a568b58f15ede3aeb10538d85e7f1f7e22fec
Time: 2020-04-17
Author: liubrandon@google.com
File Name: perfkitbenchmarker/linux_benchmarks/openfoam_benchmark.py
Class Name:
Method Name: _RunCase