Exemple #1
0
    def __init__(self,
                 input_params,
                 input_decls,
                 decl_file,
                 init_file,
                 skeleton_code_file,
                 language='c',
                 random_seed=None,
                 use_parallel_search=False,
                 validation_file=''):
        '''To instantiate the testing code generator'''

        self.input_params = input_params
        self.input_decls = input_decls
        self.decl_file = decl_file
        self.init_file = init_file
        self.validation_file = validation_file
        self.skeleton_code_file = skeleton_code_file
        self.use_parallel_search = use_parallel_search
        self.power = False

        self.iparam_code = self.__genIParams(input_params)
        self.decl_code = self.__genDecls(input_decls)
        self.malloc_code = self.__genMAllocs(input_decls)
        self.dalloc_code = self.__genDAllocs(input_decls)
        self.init_code = self.__genInits(input_decls)

        self.__checkDeclFile()
        self.__checkInitFile()
        self.__checkValidationFile()
        scode = self.__checkSkeletonCodeFile()
        self.ptest_skeleton_code = skeleton_code.PerfTestSkeletonCode(
            scode, use_parallel_search, language)
    def __init__(self, input_params, input_decls, decl_file, init_file,
                 skeleton_code_file):
        '''To instantiate the testing code generator'''

        ptest_codegen.PerfTestCodeGen.__init__(self, input_params, input_decls)

        self.decl_file = decl_file
        self.init_file = init_file
        self.skeleton_code_file = skeleton_code_file

        self.__checkDeclFile()
        self.__checkInitFile()
        scode = self.__checkSkeletonCodeFile()

        self.ptest_skeleton_code = skeleton_code.PerfTestSkeletonCode(scode)