Brainstorming: Noise optimization
#23
I'm still not too convinced about Lua parsing, it is a big chunk of work to make Lua parse something, it's much easier to let it generate something out of data it already has. Is there any way we could represent the vector code as a Lua table, for example, and let Lua generate the C++ code out of that into a "vec_doThisThat.inc" file, then in the hand-maintained cpp file we would use #include "vec_doThisThat.inc" in places where we wanted the actual code to be inserted.

So, to sum up:
vector_input.lua:
GenerateCode =
{
  vec_ThisThat =
  {
    -- Describe the calculation in a Lua table here
  },
  ...
}

cNoise.cpp:
void cCubicNoise::Generate1D(...)
{
  // Prepare the data
  #include "vec_ThisThat.h"
  // Do some post-processing
}

As for Lua under Windows, there's still the possibility to abuse tolua++ when generating the bindings to execute this additional script as well.
Reply
Thanks given by:


Messages In This Thread
Brainstorming: Noise optimization - by xoft - 03-28-2013, 05:54 AM
RE: Brainstorming: Noise optimization - by xoft - 03-28-2013, 07:29 AM
RE: Brainstorming: Noise optimization - by ThuGie - 01-15-2014, 10:29 AM
RE: Brainstorming: Noise optimization - by xoft - 01-15-2014, 10:56 PM
RE: Brainstorming: Noise optimization - by xoft - 01-16-2014, 06:18 AM
RE: Brainstorming: Noise optimization - by xoft - 01-17-2014, 05:06 AM
RE: Brainstorming: Noise optimization - by ThuGie - 01-17-2014, 07:17 AM
RE: Brainstorming: Noise optimization - by xoft - 01-18-2014, 08:13 AM
RE: Brainstorming: Noise optimization - by xoft - 01-19-2014, 01:02 AM
RE: Brainstorming: Noise optimization - by xoft - 01-19-2014, 01:20 AM
RE: Brainstorming: Noise optimization - by xoft - 01-19-2014, 01:45 AM
RE: Brainstorming: Noise optimization - by xoft - 01-19-2014, 02:05 AM
RE: Brainstorming: Noise optimization - by xoft - 01-19-2014, 07:29 AM
RE: Brainstorming: Noise optimization - by xoft - 01-19-2014, 05:14 PM
RE: Brainstorming: Noise optimization - by xoft - 01-24-2014, 06:37 PM



Users browsing this thread: 1 Guest(s)