Windows

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Windows

Post by Dade »

@Acasta69: do you now if the VisulaStudio version we are currently using supports a more recent version than OpenMP 2.5 ?

I have a lot of code around looking like:

Code: Select all

	#pragma omp parallel for
	for (
			// Visual C++ 2013 supports only OpenMP 2.5
#if _OPENMP >= 200805
			unsigned
#endif
			int i = 0; i < photons.size(); ++i) {
			}
It was required to work with VisualStudio C++ 2013 but it is ugly. I would like to remove the #if.
Support LuxCoreRender project with salts and bounties
User avatar
alpistinho
Developer
Developer
Posts: 198
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Windows

Post by alpistinho »

Hey,

I did a quick search and found plenty of people asking about an update for OpenMP on VS, so I think the answer is no :( .

I've found however that it is possible to use Clang with VS, so maybe that's an option.
https://marketplace.visualstudio.com/it ... -toolchain
Support LuxCoreRender project with salts and bounties
acasta69
Developer
Developer
Posts: 472
Joined: Tue Jan 09, 2018 3:45 pm
Location: Italy

Re: Windows

Post by acasta69 »

alpistinho wrote: Thu Jan 24, 2019 12:34 pm Hey,

I did a quick search and found plenty of people asking about an update for OpenMP on VS, so I think the answer is no :( .

I've found however that it is possible to use Clang with VS, so maybe that's an option.
https://marketplace.visualstudio.com/it ... -toolchain
I confirm, I was looking at the same topic this morning and it is still 2.5.
About clang on Windows, that's' something I'd like to try, but probably not so soon due to lack of time...
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Windows

Post by B.Y.O.B. »

What about a typedef like I did in the imagepipeline plugin tutorial?

Code: Select all

#if _OPENMP >= 200805
	typedef unsigned int itertype;
#else
	// Visual C++ 2013 supports only OpenMP 2.5
	typedef int itertype;
#endif


#pragma omp parallel for
for (itertype i = 0; i < pixelCount; ++i) {
	// ...
}
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Windows

Post by Dade »

B.Y.O.B. wrote: Thu Jan 24, 2019 1:03 pm What about a typedef like I did in the imagepipeline plugin tutorial?
Fine for me.
Support LuxCoreRender project with salts and bounties
Post Reply