Muti dimentional LUT

Please add any feature requests for Flowcode version 6 here

Moderator: Benj

Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
Post Reply
User avatar
Mantas
Posts: 221
Joined: Tue May 15, 2012 10:32 pm
Location: Klaipeda, Lithuania - North sea, UK
Has thanked: 57 times
Been thanked: 27 times
Contact:

Muti dimentional LUT

Post by Mantas »

Any chance to have some kind of option to use multidimensional LUT's in v6? As for now I am using supplementary code and C code blocks to reach values, and simulation does not work, just HW for debugging, which is not the fastest way. example of the LUT:

Code: Select all

#define N_TERM 12
#define M_TERM 13
#define COFSW 4

const double G_TERMS[N_TERM][M_TERM][COFSW]=
{
    {
        {-29496.6,0.0,11.6,0.0},
        {-1586.3,4944.4,16.5,-25.9}
    },
    {
        {-2396.6,0.0,-12.1,0.0},
        {3026.1,-2707.7,-4.4,-22.5},
        {1668.6,-576.1,1.9,-11.8}
    },
    {
        {1340.1,0.0,0.4,0.0},
        {-2326.2,-160.2,-4.1,7.3},
        {1231.9,251.9,-2.9,-3.9},
        {634.0,-536.6,-7.7,-2.6}
    },
    {
        {912.6,0.0,-1.8,0.0},
        {808.9,286.4,2.3,1.1},
        {166.7,-211.2,-8.7,2.7},
        {-357.1,164.3,4.6,3.9},
        {89.4,-309.1,-2.1,-0.8}
    },
    {
        {-230.9,0.0,-1.0,0.0},
        {357.2,44.6,0.6,0.4},
        {200.3,188.9,-1.8,1.8},
        {-141.1,-118.2,-1.0,1.2},
        {-163.0,0.0,0.9,4.0},
        { -7.8,100.9,1.0,-0.6}
    },
    {
        {72.8,0.0,-0.2,0.0},
        {68.6,-20.8,-0.2,-0.2},
        {76.0,44.1,-0.1,-2.1},
        {-141.4,61.5,2.0,-0.4},
        {-22.8,-66.3,-1.7,-0.6},
        {13.2,3.1,-0.3,0.5},
        {-77.9,55.0,1.7,0.9},    
    },
    {
        {80.5,0.0,0.1,0.0},
        {-75.1,-57.9,-0.1,0.7},
        {-4.7,-21.1,-0.6,0.3},
        {45.3,6.5,1.3,-0.1},
        {13.9,24.9,0.4,-0.1},
        {10.4,7.0,0.3,-0.8},
        {1.7,-27.7,-0.7,-0.3},
        {4.9,-3.3,0.6,0.3}
    },
    {
        {24.4,0.0,-0.1,0.0},
        {8.1,11.0,0.1,-0.1},
        {-14.5,-20.0,-0.6,0.2},
        {-5.6,11.9,0.2,0.4},
        {-19.3,-17.4,-0.2,0.4},
        {11.5,16.7,0.3,0.1},
        {10.9,7.0,0.3,-0.1},
        {-14.1,-10.8,-0.6,0.4},
        {-3.7,1.7,0.2,0.3}
    },
    {
        {5.4,0.0,-0.0,0.0},
        {9.4,-20.5,-0.1,-0.0},
        {3.4,11.5,0.0,-0.2},
        {-5.2,12.8,0.3,0.0},
        {3.1,-7.2,-0.4,-0.1},
        {-12.4,-7.4,-0.3,0.1},
        {-0.7,8.0,0.1,-0.0},
        {8.4,2.1,-0.1,-0.2},
        {-8.5,-6.1,-0.4,0.3},
        {-10.1,7.0,-0.2,0.2}
    },
    {
        {-2.0,0.0,0.0,0.0},
        {-6.3,2.8,-0.0,0.1},
        {0.9,-0.1,-0.1,-0.1},
        {-1.1,4.7,0.2,0.0},
        {-0.2,4.4,-0.0,-0.1},
        {2.5,-7.2,-0.1,-0.1},
        {-0.3,-1.0,-0.2,-0.0},
        {2.2,-3.9,0.0,-0.1},
        {3.1,-2.0,-0.1,-0.2},
        {-1.0,-2.0,-0.2,0.0},
        {-2.8,-8.3,-0.2,-0.1}
    },
    {
        {3.0,0.0,0.0,0.0},
        {-1.5,0.2,0.0,-0.0},
        {-2.1,1.7,-0.0,0.1},
        {1.7,-0.6,0.1,0.0},
        {-0.5,-1.8,-0.0,0.1},
        {0.5,0.9,0.0,0.0},
        {-0.8,-0.4,-0.0,0.1},
        {0.4,-2.5,-0.0,0.0},
        {1.8,-1.3,-0.0,-0.1},
        {0.1,-2.1,0.0,-0.1},
        {0.7,-1.9,-0.1,-0.0},
        {3.8,-1.8,-0.0,-0.1}    
    },
    {
        {-2.2,0.0,-0.0,0.0},
        {-0.2,-0.9,0.0,-0.0},
        {0.3,0.3,0.1,0.0},
        {1.0,2.1,0.1,-0.0},
        {-0.6,-2.5,-0.1,0.0},
        {0.9,0.5,-0.0,-0.0},
        {-0.1,0.6,0.0,0.1},
        {0.5,-0.0,0.0,0.0},
        {-0.4,0.1,-0.0,0.0},
        {-0.4,0.3,0.0,-0.0},
        {0.2,-0.9,0.0,-0.0},
        {-0.8,-0.2,-0.1,0.0},
        {0.0,0.9,0.1,0.0}
    }
};     
BR,
Mantas
Science is my true religion.

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Muti dimentional LUT

Post by JonnyW »

Hi. It would be nice for us to add multi-dimensional arrays natively in Flowcode.

This is something on the list of things to do and hopefully it would solve a lot of your issues. n the meantime a 2D LUT would be possible, or perhaps we can extend the current LUT to have a GetInt2D() call, etc.

Jonny

Post Reply