Re: Compiling OpenShadingLanguage under Windows


Wormszer <worm...@...>
 

Thanks Chris,

I got the defines included but after searching around and trying some various things I have been unable to find a solution to the missing math functions.

The closest I got was to using the boost library's, but they are missing two functions logbf and exp2f i believe.

I found implementations of them in the glibc but they are in assembly and need pre-processing first at least. And the licensing probably doesn't match up.
And then there is probably no guarantee VS assembler will like them.

I found a commercial implementation, but couldn't really find anything for windows open source.

So my best solutions so far is to use the boost libraries and then implementing the couple of missing functions.

But some kind of wrapper or library seems like it might be a good idea for speed or possible enhancements later on like gpu etc.

Jeremy


On Mon, Jan 18, 2010 at 12:32 AM, Chris Foster <chri...@...> wrote:
On Mon, Jan 18, 2010 at 2:51 PM, Wormszer <worm...@...> wrote:
> My generated code issues were from VS having not rebuilt the files with the
> new flex.
>
> So now I am just left with a bunch of missing math functions.
> It looks likes visual studios implementation of math. or cmath is missing a
> lot of the functions.
>
> Things like
> log2f, logbf, truncf, etc

These are all C99 math functions, not available on windows I guess...  I had a
look in boost (they implement some of the C99 functions there) but
unfortunately these ones aren't implemented yet :-(

It may be best to implement versions of these in a compatibility header for
platforms which don't have full C99 support yet.  (Maybe there is a handy C99
math library under an appropriate license from which the functions can be
taken?)

> and defines like M_E, M_1_PI, M_PI_2 etc.

The M_PI etc constants are nonstandard, but may be obtained on windows by
#defining _USE_MATH_DEFINES before you include math.h.

> See if you run into the same thing and then im not sure where to go from
> here.
>
> I guess we should get some feedback from others, maybe they are available
> somewhere else, or I could be missing something.

When you've got this figured out, it's best to submit a patch and one of the
developers will check it in, possibly after a few improvements have been made.

AFAIK there's no official guide yet for how to submit patches, but I'm going
to take a guess that the procedure won't be too much different from Larry's
other open source project, OIIO, apart from the use of codereview.appspot.com
for code reviews rather than the mailing list:

http://openimageio.org/wiki/index.php?title=Developing_OIIO


Cheers,
~Chris.

--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To post to this group, send email to osl...@....
To unsubscribe from this group, send email to osl...@....
For more options, visit this group at http://groups.google.com/group/osl-dev?hl=en.




Join osl-dev@lists.aswf.io to automatically receive all group messages.