CPPCodeGenerator class¶
(Shortest import: from brian2 import CPPCodeGenerator)
-
class
brian2.codegen.generators.cpp_generator.CPPCodeGenerator(*args, **kwds)[source]¶ Bases:
brian2.codegen.generators.base.CodeGeneratorC++ language
C++ code templates should provide Jinja2 macros with the following names:
main- The main loop.
support_code- The support code (function definitions, etc.), compiled in a separate file.
For user-defined functions, there are two keys to provide:
support_code- The function definition which will be added to the support code.
hashdefine_code- The
#definecode added to the main loop.
See
TimedArrayfor an example of these keys.Attributes
flush_denormalsrestrictMethods
denormals_to_zero_code()determine_keywords()get_array_name(var[, access_data])translate_expression(expr)translate_one_statement_sequence(statements)translate_statement(statement)translate_to_declarations(statements)translate_to_read_arrays(statements)translate_to_statements(statements)translate_to_write_arrays(statements)Details
-
flush_denormals¶
-
restrict¶