[Openmp-dev] OpenMP for loop

Alexey Bataev via Openmp-dev openmp-dev at lists.llvm.org
Mon Jan 20 16:25:06 PST 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200121/166b806a/attachment.html>


More information about the Openmp-dev mailing list