# Path: ANNarchy/generator/Profile/ProfileTemplate.py



from ANNarchy.core import Global
from .ProfileGenerator import ProfileGenerator
from .ProfileTemplate import papi_profile_template, papi_profile_header
            'prof_step_pre': papi_profile_template['step_pre'],
            'prof_step_post': papi_profile_template['step_post'],
            'prof_run_pre': papi_profile_template['run_pre'],
            'prof_run_post': papi_profile_template['run_post'],
            'prof_proj_psp_pre': papi_profile_template['proj_psp_pre'],
            'prof_proj_psp_post': papi_profile_template['proj_psp_post'],
            'prof_neur_step_pre': papi_profile_template['neur_step_pre'],
            'prof_neur_step_post': papi_profile_template['neur_step_post']
        }
        return body_dict

    def generate_init_population(self, pop):
        """
        Generate initialization code for population
        """
        declare = """
    Measurement* measure_step;
"""
        init = """        // Profiling
        measure_step = Profiling::get_instance()->register_function("pop", "%(name)s", "step");
""" % {'name': pop.name}

        return declare, init

    def generate_init_projection(self, proj):
        """
        Generate initialization code for projection
        """
        declare = """
    Measurement* measure_psp;

# Path: ANNarchy/generator/Profile/ProfileTemplate.py



# Path: ANNarchy/generator/Profile/PAPIProfile.py
from ANNarchy.core import Global
from .ProfileGenerator import ProfileGenerator
from .ProfileTemplate import papi_profile_template, papi_profile_header

            'prof_step_pre': papi_profile_template['step_pre'],
            'prof_step_post': papi_profile_template['step_post'],
            'prof_run_pre': papi_profile_template['run_pre'],
            'prof_run_post': papi_profile_template['run_post'],
            'prof_proj_psp_pre': papi_profile_template['proj_psp_pre'],
            'prof_proj_psp_post': papi_profile_template['proj_psp_post'],
            'prof_neur_step_pre': papi_profile_template['neur_step_pre'],
            'prof_neur_step_post': papi_profile_template['neur_step_post']
        }
        return body_dict

    def generate_init_population(self, pop):
        """
        Generate initialization code for population
        """
        declare = """
    Measurement* measure_step;
"""
        init = """        // Profiling
        measure_step = Profiling::get_instance()->register_function("pop", "%(name)s", "step");
""" % {'name': pop.name}

        return declare, init

    def generate_init_projection(self, proj):
        """
        Generate initialization code for projection
        """
        declare = """
    Measurement* measure_psp;

    Measurement* measure_step;