Windows

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

Windows

Post by Dade » Thu Jan 24, 2019 11:45 am

@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: 137
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Windows

Post by alpistinho » 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
Support LuxCoreRender project with salts and bounties

acasta69
Developer
Developer
Posts: 159
Joined: Tue Jan 09, 2018 3:45 pm

Re: Windows

Post by acasta69 » Thu Jan 24, 2019 12:49 pm

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 v382.05

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2748
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Windows

Post by B.Y.O.B. » Thu Jan 24, 2019 1:03 pm

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) {
	// ...
}
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Developer
Posts: 2599
Joined: Mon Dec 04, 2017 8:36 pm

Re: Windows

Post by Dade » Thu Jan 24, 2019 2:09 pm

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