loki.ir.tests.test_control_flow

Functions

test_conditional_bodies(frontend)

Verify that conditional bodies and else-bodies are tuples of Node

test_conditional_else_body_return(frontend)

test_cray_pointers(frontend)

test_cycle_stmt(tmp_path, frontend)

test_goto_stmt(tmp_path, frontend)

test_inline_conditionals(tmp_path, frontend)

Test the use of inline conditionals.

test_loop_labeled_continue(tmp_path, frontend)

Test labeled loops with continue statement.

test_loop_nest_fixed(tmp_path, frontend)

Test basic loops and reductions with fixed sizes.

test_loop_nest_variable(tmp_path, frontend)

Test basic loops and reductions with passed sizes.

test_loop_scalar_logical_expr(tmp_path, frontend)

Test a while loop with a logical expression as condition.

test_loop_unbounded(tmp_path, frontend)

Test unbounded loops.

test_multi_body_conditionals(tmp_path, frontend)

test_multi_line_forall_construct(tmp_path, ...)

test_select_case(tmp_path, frontend)

test_select_case_nested(tmp_path, frontend)

test_single_line_forall_masked_stmt(...)

test_single_line_forall_stmt(tmp_path, frontend)

test_loop_nest_fixed(tmp_path, frontend)

Test basic loops and reductions with fixed sizes.

Basic loop nest loop:

out1(i, j) = in1(i, j) + in2(i, j)

Basic reduction:

out2(j) = out2(j) + in1(i, j) * in1(i, j)

test_loop_nest_variable(tmp_path, frontend)

Test basic loops and reductions with passed sizes.

Basic loop nest loop:

out1(i, j) = in1(i, j) + in2(i, j)

Basic reduction:

out2(j) = out2(j) + in1(i, j) * in1(i, j)

test_loop_scalar_logical_expr(tmp_path, frontend)

Test a while loop with a logical expression as condition.

test_loop_unbounded(tmp_path, frontend)

Test unbounded loops.

test_loop_labeled_continue(tmp_path, frontend)

Test labeled loops with continue statement.

Note that this does not get represented 1:1 as we always insert ENDDO statements in fgen. But this does not harm the outcome as the resulting loop behaviour will still be the same.

test_inline_conditionals(tmp_path, frontend)

Test the use of inline conditionals.

test_multi_body_conditionals(tmp_path, frontend)
test_goto_stmt(tmp_path, frontend)
test_select_case(tmp_path, frontend)
test_select_case_nested(tmp_path, frontend)
test_cycle_stmt(tmp_path, frontend)
test_conditional_bodies(frontend)

Verify that conditional bodies and else-bodies are tuples of Node

test_conditional_else_body_return(frontend)
test_single_line_forall_stmt(tmp_path, frontend)
test_single_line_forall_masked_stmt(tmp_path, frontend)
test_multi_line_forall_construct(tmp_path, frontend)
test_cray_pointers(frontend)