If a preprocessor directive appears inside a type, the macro name and all guarded variables appear inside the mapper.
Original
module test_module
type test_type
integer :: n
#ifdef SOME_MACRO
integer :: m
#endif
end type test_type
end module
Migrated
module test_module
type test_type
integer :: n
#ifdef SOME_MACRO
integer :: m
#endif
end type test_type
!$omp declare mapper (test_type::x) map (x%n,x%some_macro,x%m)
end module
Expected
I'm not 100% sure on how to get the line continuation to work here, but I think it's something like the below.
module test_module
type test_type
integer :: n
#ifdef SOME_MACRO
integer :: m
#endif
end type test_type
!$omp declare mapper (test_type::x) map(x%n&
#ifdef SOME_MACRO
!$omp ,x%m&
#endif
!$omp )
end module
If a preprocessor directive appears inside a type, the macro name and all guarded variables appear inside the mapper.
Original
Migrated
Expected
I'm not 100% sure on how to get the line continuation to work here, but I think it's something like the below.