[Openmp-dev] OpenMP for loop

Abid Malik via Openmp-dev openmp-dev at lists.llvm.org
Mon Jan 20 16:33:59 PST 2020


Thanks. Is there a way to get the actual loop increment. I am comparing two
loops wrt the increment value. It seems I always get the same "1" value no
matter how I define the loop increment.

On Mon, Jan 20, 2020 at 7:25 PM Alexey Bataev <a.bataev at hotmail.com> wrote:

> The loop iteration space is normalized.
>
> Best regards,
> Alexey Bataev
>
> 20 янв. 2020 г., в 19:24, Abid Malik via Openmp-dev <
> openmp-dev at lists.llvm.org> написал(а):
>
> 
> Hello,
>
> When compiling the following loop with clang:
>
> void before (int N){
> 	#pragma omp for nowait
> 	for (int i=0; i < N; i=i+3)
> 		g(i);
> }
>
>
>
> I get :
>
>
> call void @__kmpc_for_static_init_4(%struct.ident_t* @0, i32 %13, i32 34, i32* %11, i32*
> %8, i32* %9, i32* %10, *i32 1*, i32 1)
>
>
> As per definition the second last argument  gives loop increment. Now for the given loop, should it be 3? Why am I getting "1"?
>
>
> Thanks,
>
>
> --
> Abid M. Malik
> ******************************************************
> "I have learned silence from the talkative, toleration from the
> intolerant, and kindness from the unkind"---Gibran
> "Success is not for the chosen few, but for the few who choose" --- John
> Maxwell
> "Being a good person does not depend on your religion or status in life,
> your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD
> YOU TREAT OTHERS"--- Abid
> "The Universe is talking to us, and the language of the Universe is
> mathematics."----Abid
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>
>

-- 
Abid M. Malik
******************************************************
"I have learned silence from the talkative, toleration from the intolerant,
and kindness from the unkind"---Gibran
"Success is not for the chosen few, but for the few who choose" --- John
Maxwell
"Being a good person does not depend on your religion or status in life,
your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD
YOU TREAT OTHERS"--- Abid
"The Universe is talking to us, and the language of the Universe is
mathematics."----Abid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200120/6536318a/attachment.html>


More information about the Openmp-dev mailing list