Пример #1
0
from aftermath.templates import FunctionTemplate, \
    Jinja2FileTemplate, \
    gen_function_file_template_class_int_ctx

import aftermath.tags as tags
import aftermath
import os

from aftermath.types import Field, FieldList

# A template implementing
# aftermath.tags.mem.store.pereventcollectionsubarray.GenerateDestroyAllArraysFunction
DestroyAllArraysFunction = gen_function_file_template_class_int_ctx(
    class_name="DestroyAllArraysFunction",
    required_tags={
        "gen_tag":
        tags.mem.store.pereventcollectionsubarray.
        GenerateDestroyAllArraysFunction
    },
    directory=os.path.dirname(__file__))


class BaseAppendFunction(FunctionTemplate, Jinja2FileTemplate):
    """A template generating a function that appends an element to a
    per-event-collection sub-array, creating the array if necessary.
    """
    def __init__(self, tpl_file, reqtags, mem_type):
        Jinja2FileTemplate.__init__(self, tpl_file)

        tag = reqtags["tag"]
        gen_tag = reqtags["gen_tag"]
Пример #2
0
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
# USA.

from aftermath.templates import gen_function_file_template_class_int_ctx
from aftermath import tags
import os

CollectGraphRootsFunction = gen_function_file_template_class_int_ctx(
    class_name="CollectGraphRootsFunction",
    required_tags={
        "gen_tag": tags.postprocess.graph.GenerateCollectGraphRootsFunction
    },
    directory=os.path.dirname(__file__))

CheckRootCountFunction = gen_function_file_template_class_int_ctx(
    class_name="CheckRootCountFunction",
    required_tags={
        "gen_tag": tags.postprocess.graph.GenerateCheckRootCountFunction
    },
    directory=os.path.dirname(__file__))
Пример #3
0
# Author: Andi Drebes <*****@*****.**>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
# USA.

from aftermath.templates import gen_function_file_template_class_int_ctx
from aftermath import tags
import os

# Template implementing tags.teardown.GenerateTeardownFunction
TeardownFunction = gen_function_file_template_class_int_ctx(
    class_name = "TeardownFunction",
    required_tags = { "gen_tag" : tags.teardown.GenerateTeardownFunction },
    directory = os.path.dirname(__file__))
Пример #4
0
# Author: Andi Drebes <*****@*****.**>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
# USA.

from aftermath.templates import gen_function_file_template_class_int_ctx
from aftermath import tags
import os

# Template implementing tags.postprocess.GeneratePostprocessFunction
PostprocessFunction = gen_function_file_template_class_int_ctx(
    class_name="PostprocessFunction",
    required_tags={"gen_tag": tags.postprocess.GeneratePostprocessFunction},
    directory=os.path.dirname(__file__))
Пример #5
0
            arglist=FieldList([
                Field(name="ctx",
                      field_type=aftermath.types.aux.am_io_context,
                      is_pointer=True),
                Field(name="dsk", field_type=dsk_type, is_pointer=True)
            ]))

        self.addDefaultArguments(dsk_type=dsk_type)
        self.addDefaultArguments(**reqtags_dsk)
        self.addDefaultArguments(**reqtags_mem)


# Template implementing tags.dsk.tomem.GenerateSortMetaStructArrayFunction
SortMetaStructArrayFunction = gen_function_file_template_class_int_ctx(
    class_name="SortMetaStructArrayFunction",
    required_tags={
        "gen_tag": tags.dsk.tomem.GenerateSortMetaStructArrayFunction
    },
    directory=os.path.dirname(__file__))

# Template implementing tags.dsk.tomem.GenerateMatchAllMetaStructArraysFunction
MatchAllMetaStructArraysFunction = gen_function_file_template_class_int_ctx(
    class_name="MatchAllMetaStructArraysFunction",
    required_tags={
        "gen_tag": tags.dsk.tomem.GenerateMatchAllMetaStructArraysFunction,
        "sources_tag": tags.dsk.tomem.join.JoinSources
    },
    directory=os.path.dirname(__file__))


class AddToAllMetaStructArraysFunction(FunctionTemplate, Jinja2FileTemplate):
    """A template implementing
Пример #6
0
# Author: Andi Drebes <*****@*****.**>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
# USA.

from aftermath.templates import gen_function_file_template_class_int_ctx
from aftermath import tags
import os

# A template implementing
# aftermath.tags.finalize.GenerateFinalizeFunction
FinalizeFunction = gen_function_file_template_class_int_ctx(
    class_name="FinalizeFunction",
    required_tags={"gen_tag": tags.finalize.GenerateFinalizeFunction},
    directory=os.path.dirname(__file__))