/*
 * Copyright (c) 2018-2025, High Performance Computing Architecture and System
 * research laboratory at University of North Carolina at Charlotte (HPCAS@UNCC)
 * and Lawrence Livermore National Security, LLC.
 *
 * SPDX-License-Identifier: (BSD-3-Clause)
 */

//For testing purpose, there are several extra empty lines.
//The final version should only contain necessary information.
//This is not a C/C++ code, so there's no required writing style.
//Only two kinds of special lines will be recognized.
//One is starting with "omp", which is the input.
//The other one is starting with "PASS: ", which is the result for validation.

!$omp target parallel do simd
PASS: !$omp target parallel do simd 

!$omp target parallel do simd if(target:3456) device(ancestor:5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr(m,n,j) defaultmap(alloc:pointer) nowait depend(iterator(int bba=4:120:2), in:m, n) allocate (omp_default_mem_alloc : m, n[1:5]) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))
PASS: !$omp target parallel do simd if (target: 3456) device (ancestor : 5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr (m, n, j) defaultmap (alloc: pointer) nowait depend (iterator ( int bba=4:120:2 ), in : m, n) allocate (omp_default_mem_alloc: m, n[1:5]) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) )

!$omp target parallel do simd if(target:3456) device(ancestor:5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr(m,n,j) defaultmap(alloc:pointer) nowait depend(iterator(int bba=4:120:2,char huj = 2:677), inout:m, n) allocate (omp_default_mem_alloc : m, n[1:5]) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))
PASS: !$omp target parallel do simd if (target: 3456) device (ancestor : 5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr (m, n, j) defaultmap (alloc: pointer) nowait depend (iterator ( int bba=4:120:2, char huj=2:677 ), inout : m, n) allocate (omp_default_mem_alloc: m, n[1:5]) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) )

!$omp target parallel do simd private (a, b) num_threads (3*5+4/(7+10)) firstprivate (x, y) shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20],a,y) default (shared) if (parallel : b) linear(a,b,c:2) if (simd: b) schedule(monotonic,simd:runtime,2) collapse(a) ordered(a) nowait copyin (a[foo(goo(x)):20],a,y) default (shared) proc_bind (master) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))
PASS: !$omp target parallel do simd private (a, b) num_threads (3*5+4/(7+10)) firstprivate (x, y) shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20], a, y) default (shared) if (parallel: b) linear (a, b, c:2) if (simd: b) schedule (monotonic,simd:runtime, 2) collapse (a) ordered (a) nowait proc_bind (master) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) )

!$omp target parallel do simd private (a, b) num_threads (3*5+4/(7+10)) firstprivate (x, y) shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20],a,y) default (shared) if (parallel : b) if(target:3456) device(ancestor:5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr(m,n,j) if (simd: b) defaultmap(alloc:pointer) nowait depend(iterator(int bba=4:120:2,char huj = 2:677), inout:m, n) allocate (omp_default_mem_alloc : m, n[1:5]) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234)) default (shared) proc_bind (master) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))
PASS: !$omp target parallel do simd private (a, b, x, n[1:5]) num_threads (3*5+4/(7+10)) firstprivate (x, y, foo(x)) shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20], a, y) default (shared) if (parallel: b) if (target: 3456) device (ancestor : 5) in_reduction (test_identifier : x11, y, z) is_device_ptr (m, n, j) if (simd: b) defaultmap (alloc: pointer) nowait depend (iterator ( int bba=4:120:2, char huj=2:677 ), inout : m, n) allocate (omp_default_mem_alloc: m, n[1:5]) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) ) proc_bind (master) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) )

!$omp end target parallel do simd
PASS: !$omp end target parallel do simd 
