Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(206)

Issue 205045: sincos opcode (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 1 month ago by ckulla
Modified:
14 years, 1 month ago
Reviewers:
dev-osl, larrygritz, osl-dev
Base URL:
http://openshadinglanguage.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Add a new opcode that computes sin and cos together

Patch Set 1 #

Patch Set 2 : using portable sincos instead of calls to sin and cos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -0 lines) Patch
src/liboslcomp/typecheck.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
src/liboslexec/master.cpp View 1 chunk +1 line, -0 lines 0 comments Download
src/liboslexec/opmathfunc.cpp View 1 3 chunks +167 lines, -0 lines 0 comments Download
src/liboslexec/oslops.h View 1 chunk +1 line, -0 lines 0 comments Download
testsuite/trig/ref/out.txt View 15 chunks +21 lines, -0 lines 0 comments Download
testsuite/trig/test.osl View 16 chunks +35 lines, -0 lines 0 comments Download

Messages

Total messages: 15
ckulla
14 years, 1 month ago (2010-02-08 23:05:04 UTC) #1
larrygritz
Dude, use the C++ sincos() function to compute the sines and cosines! You may as ...
14 years, 1 month ago (2010-02-08 23:18:07 UTC) #2
lg_larrygritz.com
PS. I'll take care of editing the spec to add this function. On Feb 8, ...
14 years, 1 month ago (2010-02-08 23:20:32 UTC) #3
ckulla
On 2010/02/08 23:18:07, larrygritz wrote: > Dude, use the C++ sincos() function to compute the ...
14 years, 1 month ago (2010-02-08 23:22:43 UTC) #4
lg_imageworks.com
I would put in fmath.h: #ifndef __GNUC__ ... define it in terms of sin and ...
14 years, 1 month ago (2010-02-08 23:25:37 UTC) #5
ckulla
Its more complicated than that. The symbol doesn't show up by default. You need to ...
14 years, 1 month ago (2010-02-08 23:31:22 UTC) #6
lg_imageworks.com
Of course, please substitute whatever compiler or version checks *correctly* discern whether sincos is available. ...
14 years, 1 month ago (2010-02-08 23:32:32 UTC) #7
lg_imageworks.com
1. At the top of fmath.h, before #include <cmath>: #ifndef __MATH_H__ #define _GNU_SOURCE #endif 2. ...
14 years, 1 month ago (2010-02-08 23:48:06 UTC) #8
ckulla
I found an alternative that gets around having to use _GNU_SOURCE (which might have other ...
14 years, 1 month ago (2010-02-09 01:16:10 UTC) #9
ckulla
using portable sincos instead of calls to sin and cos
14 years, 1 month ago (2010-02-09 01:27:22 UTC) #10
ckulla
On 2010/02/09 01:27:22, ckulla wrote: > using portable sincos instead of calls to sin and ...
14 years, 1 month ago (2010-02-09 01:28:16 UTC) #11
blair
Solaris provides sincos as part of math.h. Given that OSL is now an open-source project, ...
14 years, 1 month ago (2010-02-09 01:35:15 UTC) #12
lg_larrygritz.com
LGTM! Feel free to check it into the OIIO trunk. On Feb 8, 2010, at ...
14 years, 1 month ago (2010-02-09 01:35:45 UTC) #13
sboulos_imageworks.com
I'm surprised this didn't get raised already: does gcc not perform this transformation automatically in ...
14 years, 1 month ago (2010-02-09 02:08:34 UTC) #14
ckulla
14 years, 1 month ago (2010-02-09 19:21:10 UTC) #15
gcc documentation suggests that it can (macro TARGET_HAS_SINCOS) - but our
version doesn't seem to do it automatically.

In theory its true that it would be nice to just let the compiler take care of
this.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b