[Openmp-dev] OpenMP for loop

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


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


More information about the Openmp-dev mailing list