<div dir="auto">The github URL to it should be ok.</div><div class="gmail_extra"><br><div class="gmail_quote">On 11 Mar 2018 1:01 pm, "Guillaume Chéreau" <<a href="mailto:guillaume.chereau@gmail.com">guillaume.chereau@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I started to work on a proper branch, it's not done yet, but I can<br>
push it online if anybody is interested to have a look.<br>
What would be the easiest way to share a branch for review?<br>
<br>
Regards,<br>
Guillaume<br>
<br>
On Wed, Mar 7, 2018 at 6:05 AM, Brecht Van Lommel<br>
<<a href="mailto:brechtvanlommel@pandora.be">brechtvanlommel@pandora.be</a>> wrote:<br>
> Using std::string instead of ustring will lead to a lot more memory<br>
> allocations, which can be slow but may be ok in practice for the way Cycles<br>
> uses it.<br>
><br>
> Feel free to submit a patch on <a href="http://developer.blender.org" rel="noreferrer" target="_blank">developer.blender.org</a> when you think the code<br>
> is in a good state.<br>
><br>
> On Tue, Mar 6, 2018 at 4:47 AM, Guillaume Chéreau<br>
> <<a href="mailto:guillaume.chereau@gmail.com">guillaume.chereau@gmail.com</a>> wrote:<br>
>><br>
>> I just started a branch of Cycles on github for the goxel version.<br>
>><br>
>> My first commit allows to use std::string for ustring and a custom<br>
>> implementation of TypeDef:<br>
>><br>
>> <a href="https://github.com/guillaumechereau/cycles/commit/0f286bc4da5536a19640eb4ede640423e317e733" rel="noreferrer" target="_blank">https://github.com/<wbr>guillaumechereau/cycles/<wbr>commit/<wbr>0f286bc4da5536a19640eb4ede6404<wbr>23e317e733</a><br>
>><br>
>> Regards,<br>
>> Guillaume<br>
>><br>
>> On Tue, Mar 6, 2018 at 10:05 AM, Guillaume Chéreau<br>
>> <<a href="mailto:guillaume.chereau@gmail.com">guillaume.chereau@gmail.com</a>> wrote:<br>
>> > It is actually not difficult to replace oiio ustring with std::string<br>
>> > in the code, since the api are almost the same, but the performance<br>
>> > are probably not as good with std::string.<br>
>> ><br>
>> > In util/util_param.h, I can comment out the OpenImageIO/ustring.h<br>
>> > include and add those lines:<br>
>> ><br>
>> > // ustring implementation based on std::string.<br>
>> > class ustring : public std::string<br>
>> > {<br>
>> > public:<br>
>> >     ustring() {}<br>
>> >     explicit ustring(const char *str) : std::string(str) {}<br>
>> >     ustring (const ustring &str) : ustring(str.c_str()) {}<br>
>> >     ustring (const std::string &str) : ustring(str.c_str()) {}<br>
>> >     const std::string &string() const { return *this; }<br>
>> >     operator int(void) const { return !empty(); }<br>
>> >     const ustring &operator=(const char *str) { *this = str; return<br>
>> > *this; }<br>
>> > };<br>
>> > typedef std::hash<std::string> ustringHash;<br>
>> ><br>
>> > And the compilation works.<br>
>> ><br>
>> > Similar treatment can be done for typedesc.<br>
>> ><br>
>> ><br>
>> > Regards,<br>
>> > Guillaume<br>
>> ><br>
>> > --<br>
>> > Guillaume<br>
>> > <a href="mailto:guillaume.chereau@gmail.com">guillaume.chereau@gmail.com</a><br>
>> > <a href="tel:%2B886%20970422910" value="+886970422910">+886 970422910</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Guillaume<br>
>> <a href="mailto:guillaume.chereau@gmail.com">guillaume.chereau@gmail.com</a><br>
>> <a href="tel:%2B886%20970422910" value="+886970422910">+886 970422910</a><br>
>> ______________________________<wbr>_________________<br>
>> Bf-cycles mailing list<br>
>> <a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
>> <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Bf-cycles mailing list<br>
> <a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
> <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
><br>
<br>
<br>
<br>
--<br>
Guillaume<br>
<a href="mailto:guillaume.chereau@gmail.com">guillaume.chereau@gmail.com</a><br>
<a href="tel:%2B886%20970422910" value="+886970422910">+886 970422910</a><br>
______________________________<wbr>_________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/bf-cycles</a><br>
</blockquote></div></div>