def _build_scalar_declarations(self, with_init=True):
<EOL>scalar_declarations = [deepcopy(d) for d in self.kernel_ast.block_items<EOL>if type(d) is c_ast.Decl and type(d.type) is c_ast.TypeDecl]<EOL>if with_init:<EOL><INDENT>random.seed(<NUM_LIT>)  <EOL>for d in scalar_declarations:<EOL><INDENT>if d.type.type.names[<NUM_LIT:0>] in ['<STR_LIT>', '<STR_LIT:float>']:<EOL><INDENT>d.init = c_ast.Constant('<STR_LIT:float>', str(random.uniform(<NUM_LIT:1.0>, <NUM_LIT:0.1>)))<EOL><DEDENT>elif d.type.type.names[<NUM_LIT:0>] in ['<STR_LIT:int>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>d.init = c_ast.Constant('<STR_LIT:int>', <NUM_LIT:2>)<EOL><DEDENT><DEDENT><DEDENT>return scalar_declarations<EOL>
Build and return scalar variable declarations