Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
codegen.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2021, Johannes Pekkila.
3
4 This file is part of Astaroth.
5
6 Astaroth is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 Astaroth is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Astaroth. If not, see <http://www.gnu.org/licenses/>.
18*/
19#pragma once
20#include <stdbool.h>
21
22#include "ast.h"
23
24void generate(const ASTNode* root, FILE* stream, const bool gen_mem_accesses, const bool eliminate_conditionals, const bool optimize_mem_accesses);
25
27
28//Number of translation units the analysis kernels are split into when compiling the stencil access generator
30
31void gen_extra_funcs(const ASTNode* root, FILE* stream);
32
33void preprocess(ASTNode* root, const bool optimize_conditionals);
34
36
37void gen_boundcond_kernels(const ASTNode* root_in, FILE* stream);
38
40
41void gen_kfunc_info(const ASTNode* root);
42
43//Destroys the tree and resets the caches pointing to it
44void destroy_ast(ASTNode* root);
static const Stream stream
Definition astaroth_device.h:187
void gen_kfunc_info(const ASTNode *root)
int acc_num_analysis_source_files
void destroy_ast(ASTNode *root)
void preprocess(ASTNode *root, const bool optimize_conditionals)
void gen_extra_funcs(const ASTNode *root, FILE *stream)
void gen_output_files(ASTNode *root)
void gen_boundcond_kernels(const ASTNode *root_in, FILE *stream)
void generate(const ASTNode *root, FILE *stream, const bool gen_mem_accesses, const bool eliminate_conditionals, const bool optimize_mem_accesses)
void gen_fused_kernels(ASTNode *root)
void generate_mem_accesses(void)
Definition ast.h:146