Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/charisee/ertest/vispaper/tiso3d/resamp.c
ViewVC logotype

View of /branches/charisee/ertest/vispaper/tiso3d/resamp.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3090 - (download) (as text) (annotate)
Tue Mar 17 19:46:26 2015 UTC (4 years, 6 months ago) by glk
File size: 18289 byte(s)
for tensor fields
#define DIDEROT_SINGLE_PRECISION
#define DIDEROT_INT
#define DIDEROT_TARGET_C
#include "Diderot/diderot.h"
static char *ProgramName = "resamp";
int32_t G_sz0_0;
Diderot_real_t G_xdir_1[3];
Diderot_real_t G_ydir_2[3];
Diderot_real_t G_zdir_3[3];
float G__t_4;
float G__t_5;
Diderot_image3D_t *G__t_6;
Diderot_vec4_t load3to4 (Diderot_real_t *a, int i)
{
    return (Diderot_vec4_t){a[i],a[1+i],a[2+i],0};
}
void store4to3 (Diderot_real_t *a, int i, Diderot_vec4_t v)
{
    Diderot_union4_t u = __extension__ (Diderot_union4_t)v;
    a[i] = u.r[0];
    a[1+i] = u.r[1];
    a[2+i] = u.r[2];
    return;
}
Diderot_vec4_t V_ConsVec4 (Diderot_real_t r0, Diderot_real_t r1, Diderot_real_t r2, Diderot_real_t r3)
{
    return __extension__ (Diderot_vec4_t){r0,r1,r2,r3};
}
Diderot_vec4_t V_Scale4 (Diderot_real_t r, Diderot_vec4_t v)
{
    return V_ConsVec4(r, r, r, r)*v;
}
void V_ConsArr3 (Diderot_real_t *a, Diderot_real_t r0, Diderot_real_t r1, Diderot_real_t r2)
{
    a[0] = r0;
    a[1] = r1;
    a[2] = r2;
    return;
}
void V_CopyArr3 (Diderot_real_t *a, Diderot_real_t *b, int i)
{
    a[i] = b[0];
    a[1+i] = b[1];
    a[2+i] = b[2];
}
void V_CopyArr4 (Diderot_real_t *a, Diderot_real_t *b, int i)
{
    a[i] = b[0];
    a[1+i] = b[1];
    a[2+i] = b[2];
    a[3+i] = b[3];
}
void V_CopyArr9 (Diderot_real_t *a, Diderot_real_t *b, int i)
{
    a[i] = b[0];
    a[1+i] = b[1];
    a[2+i] = b[2];
    a[3+i] = b[3];
    a[4+i] = b[4];
    a[5+i] = b[5];
    a[6+i] = b[6];
    a[7+i] = b[7];
    a[8+i] = b[8];
}
Diderot_real_t V_SumVec3 (Diderot_vec4_t v_0)
{
    Diderot_union4_t u_0 = __extension__ (Diderot_union4_t)v_0;
    return u_0.r[0]+u_0.r[1]+u_0.r[2]+u_0.r[3];
}
Diderot_real_t V_SumVec4 (Diderot_vec4_t v_0)
{
    Diderot_union4_t u_0 = __extension__ (Diderot_union4_t)v_0;
    return u_0.r[0]+u_0.r[1]+u_0.r[2]+u_0.r[3];
}
Diderot_vec4_t V_FloorVec4 (Diderot_vec4_t v)
{
    Diderot_union4_t u = __extension__ (Diderot_union4_t)v;
    return __extension__ (Diderot_vec4_t){FLOOR(u.r[0]),FLOOR(u.r[1]),FLOOR(u.r[2]),FLOOR(u.r[3])};
}
void Diderot_RegisterGlobalOpts (Diderot_Options_t *opts)
{
    return;
}
void Diderot_InitGlobals ()
{
    float l_divSca_7;
    Diderot_vec4_t l_spc_8;
    Diderot_vec4_t l_4spc_9;
    G_sz0_0 = 30;
    G__t_4 = (float)(G_sz0_0-1);
    l_divSca_7 = 0.58e2f/G__t_4;
    l_4spc_9 = V_ConsVec4(l_divSca_7, l_divSca_7, l_divSca_7, 0);
    V_ConsArr3(G_xdir_1, ((union3f_t)l_4spc_9).r[0], 0.0f, 0.0f);
    V_ConsArr3(G_ydir_2, 0.0f, ((union3f_t)l_4spc_9).r[1], 0.0f);
    V_ConsArr3(G_zdir_3, 0.0f, 0.0f, ((union3f_t)l_4spc_9).r[2]);
    G__t_5 = (float)2;
    {
        Status_t _sts = Diderot_LoadImage3D("tball.nrrd", &G__t_6);
        if (DIDEROT_OK!=_sts) exit(1);
    }
    return;
}
void Diderot_Shutdown (Diderot_World_t *wrld)
{
}
typedef struct {
    float vv;
    int32_t zi;
    int32_t yi;
    int32_t xi;
} Strand_sample_t;
void sample_InitState (Strand_sample_t *selfOut, int32_t p_xi_10, int32_t p_yi_11, int32_t p_zi_12)
{
    selfOut->zi = p_zi_12;
    selfOut->yi = p_yi_11;
    selfOut->xi = p_xi_10;
    selfOut->vv = 0.0f;
    return;
}
static void sample_Stabilize (Strand_sample_t *selfIn, Strand_sample_t *selfOut)
{
    int32_t l_xi_203;
    int32_t l_yi_204;
    int32_t l_zi_205;
    float l_vv_206;
    selfOut->vv = selfIn->vv;
    return;
}
static StrandStatus_t sample_Update (Strand_sample_t *selfIn, Strand_sample_t *selfOut)
{
    int32_t l_xi_13;
    int32_t l_yi_14;
    int32_t l_zi_15;
    Diderot_vec4_t l_prodScaV_16;
    Diderot_vec4_t l_prodScaV_17;
    Diderot_vec4_t l_prodScaV_18;
    Diderot_vec4_t l_prodScaV_19;
    Diderot_vec4_t l_mult_3_20;
    Diderot_vec4_t l_mult_2_21;
    float l_cast_22;
    Diderot_vec4_t l_prodScaV_23;
    Diderot_vec4_t l_4prodScaV_24;
    float l_cast_25;
    float l_divSca_26;
    Diderot_vec4_t l_cons__27;
    Diderot_vec4_t l_prodScaV_28;
    Diderot_vec4_t l_prodScaV_29;
    Diderot_vec4_t l_mult_4_30;
    Diderot_vec4_t l_mult_3_31;
    Diderot_vec4_t l_mult_2_32;
    Diderot_vec4_t l_4mult_2_33;
    Diderot_real_t l_M_0_34[9];
    Diderot_vec4_t l_Proj_0__35;
    Diderot_vec4_t l_prodV_36;
    float l_sumVec_37;
    Diderot_vec4_t l_Proj_1__38;
    Diderot_vec4_t l_prodV_39;
    float l_sumVec_40;
    Diderot_vec4_t l_Proj_2__41;
    Diderot_vec4_t l_prodV_42;
    float l_sumVec_43;
    Diderot_vec4_t l_cons__44;
    Diderot_vec4_t l_mult_2_45;
    Diderot_vec4_t l_4mult_2_46;
    Diderot_vec4_t l_cons__47;
    Diderot_vec4_t l_cons__48;
    Diderot_vec4_t l_cons__49;
    Diderot_real_t l_cons__50[9];
    Diderot_vec4_t l_nd_51;
    Diderot_vec4_t l_4nd_52;
    Diderot_vec4_t l_subVec_53;
    Diderot_vec4_t l_4subVec_54;
    vec3i_t l_n_55;
    float *l_baseAddr_56;
    int32_t l_addInt_57;
    int32_t l_Indx_1__58;
    int32_t l_addInt_59;
    int32_t l_Indx_2__60;
    int32_t l_prodInt_61;
    float *l_addPtr_62;
    float *l_rp_imgLoad_63;
    Diderot_vec4_t l_4imgLoad_64;
    float *l_addPtr_65;
    float *l_rp_imgLoad_66;
    Diderot_vec4_t l_4imgLoad_67;
    int32_t l_addInt_68;
    float *l_addPtr_69;
    float *l_rp_imgLoad_70;
    Diderot_vec4_t l_4imgLoad_71;
    int32_t l_addInt_72;
    float *l_addPtr_73;
    float *l_rp_imgLoad_74;
    Diderot_vec4_t l_4imgLoad_75;
    int32_t l_prodInt_76;
    float *l_addPtr_77;
    float *l_rp_imgLoad_78;
    Diderot_vec4_t l_4imgLoad_79;
    float *l_addPtr_80;
    float *l_rp_imgLoad_81;
    Diderot_vec4_t l_4imgLoad_82;
    float *l_addPtr_83;
    float *l_rp_imgLoad_84;
    Diderot_vec4_t l_4imgLoad_85;
    float *l_addPtr_86;
    float *l_rp_imgLoad_87;
    Diderot_vec4_t l_4imgLoad_88;
    int32_t l_prodInt_89;
    float *l_addPtr_90;
    float *l_rp_imgLoad_91;
    Diderot_vec4_t l_4imgLoad_92;
    float *l_addPtr_93;
    float *l_rp_imgLoad_94;
    Diderot_vec4_t l_4imgLoad_95;
    float *l_addPtr_96;
    float *l_rp_imgLoad_97;
    Diderot_vec4_t l_4imgLoad_98;
    float *l_addPtr_99;
    float *l_rp_imgLoad_100;
    Diderot_vec4_t l_4imgLoad_101;
    int32_t l_prodInt_102;
    float *l_addPtr_103;
    float *l_rp_imgLoad_104;
    Diderot_vec4_t l_4imgLoad_105;
    float *l_addPtr_106;
    float *l_rp_imgLoad_107;
    Diderot_vec4_t l_4imgLoad_108;
    float *l_addPtr_109;
    float *l_rp_imgLoad_110;
    Diderot_vec4_t l_4imgLoad_111;
    float *l_addPtr_112;
    float *l_rp_imgLoad_113;
    Diderot_vec4_t l_4imgLoad_114;
    float l_Indx_0__115;
    float l_cast_116;
    float l_Indx_1__117;
    float l_Indx_2__118;
    Diderot_vec4_t l_cons__119;
    Diderot_vec4_t l_4cons__120;
    Diderot_vec4_t l_cons__121;
    Diderot_vec4_t l_4cons__122;
    Diderot_vec4_t l_cons__123;
    Diderot_vec4_t l_4cons__124;
    Diderot_vec4_t l_P0_125;
    Diderot_vec4_t l_4P0_126;
    Diderot_vec4_t l_P1_127;
    Diderot_vec4_t l_4P1_128;
    Diderot_vec4_t l_P2_129;
    Diderot_vec4_t l_4P2_130;
    Diderot_vec4_t l_P3_131;
    Diderot_vec4_t l_4P3_132;
    Diderot_vec4_t l_prodV_133;
    Diderot_vec4_t l_addV_134;
    Diderot_vec4_t l_prodV_135;
    Diderot_vec4_t l_addV_136;
    Diderot_vec4_t l_prodV_137;
    Diderot_vec4_t l_addV_138;
    Diderot_vec4_t l_4addV_139;
    Diderot_vec4_t l_prodV_140;
    Diderot_vec4_t l_addV_141;
    Diderot_vec4_t l_prodV_142;
    Diderot_vec4_t l_addV_143;
    Diderot_vec4_t l_prodV_144;
    Diderot_vec4_t l_addV_145;
    Diderot_vec4_t l_4addV_146;
    Diderot_vec4_t l_prodV_147;
    Diderot_vec4_t l_addV_148;
    Diderot_vec4_t l_prodV_149;
    Diderot_vec4_t l_addV_150;
    Diderot_vec4_t l_prodV_151;
    Diderot_vec4_t l_addV_152;
    Diderot_vec4_t l_prodV_153;
    float l_sumVec_154;
    Diderot_vec4_t l_prodV_155;
    float l_sumVec_156;
    Diderot_vec4_t l_prodV_157;
    float l_sumVec_158;
    Diderot_vec4_t l_prodV_159;
    float l_sumVec_160;
    Diderot_vec4_t l_cons__161;
    Diderot_vec4_t l_prodV_162;
    float l_sumVec_163;
    Diderot_vec4_t l_prodV_164;
    float l_sumVec_165;
    Diderot_vec4_t l_prodV_166;
    float l_sumVec_167;
    Diderot_vec4_t l_prodV_168;
    float l_sumVec_169;
    Diderot_vec4_t l_cons__170;
    Diderot_vec4_t l_prodV_171;
    float l_sumVec_172;
    Diderot_vec4_t l_prodV_173;
    float l_sumVec_174;
    Diderot_vec4_t l_prodV_175;
    float l_sumVec_176;
    Diderot_vec4_t l_prodV_177;
    float l_sumVec_178;
    Diderot_vec4_t l_cons__179;
    Diderot_vec4_t l_prodV_180;
    float l_sumVec_181;
    Diderot_vec4_t l_prodV_182;
    float l_sumVec_183;
    Diderot_vec4_t l_prodV_184;
    float l_sumVec_185;
    Diderot_vec4_t l_prodV_186;
    float l_sumVec_187;
    Diderot_vec4_t l_cons__188;
    Diderot_vec4_t l_prodV_189;
    float l_sumVec_190;
    Diderot_vec4_t l_prodV_191;
    float l_sumVec_192;
    Diderot_vec4_t l_prodV_193;
    float l_sumVec_194;
    Diderot_vec4_t l_prodV_195;
    float l_sumVec_196;
    Diderot_vec4_t l_cons__197;
    Diderot_vec4_t l_prodV_198;
    float l_sumVec_199;
    float l_sumVec_200;
    float l_mult_2_201;
    float l_prodSca_202;
    l_cast_22 = (float)-1;
    l_4prodScaV_24 = V_Scale4(l_cast_22,
        V_Scale4(G__t_4, load3to4(G_xdir_1, 0))+V_Scale4(G__t_4, load3to4(G_ydir_2, 0))+V_Scale4(G__t_4,
            load3to4(G_zdir_3, 0)));
    l_cast_25 = (float)1;
    l_divSca_26 = l_cast_25/G__t_5;
    l_4mult_2_33 = V_ConsVec4(l_divSca_26*((Diderot_union4_t)l_4prodScaV_24).r[0],
        l_divSca_26*((Diderot_union4_t)l_4prodScaV_24).r[1], l_divSca_26*((Diderot_union4_t)l_4prodScaV_24).r[2], 0)+V_Scale4(
        (float)selfIn->xi, load3to4(G_xdir_1, 0))+V_Scale4((float)selfIn->yi, load3to4(G_ydir_2, 0))+V_Scale4(
        (float)selfIn->zi, load3to4(G_zdir_3, 0));
    store4to3(l_M_0_34, 0, G__t_6->w2i[0].v);
    store4to3(l_M_0_34, 3, G__t_6->w2i[1].v);
    store4to3(l_M_0_34, 6, G__t_6->w2i[2].v);
    l_4mult_2_46 = V_ConsVec4(V_SumVec3(load3to4(l_M_0_34, 0)*l_4mult_2_33),
        V_SumVec3(load3to4(l_M_0_34, 3)*l_4mult_2_33), V_SumVec3(load3to4(l_M_0_34, 6)*l_4mult_2_33), 0)+G__t_6->tVec;
    store4to3(l_cons__50, 0, V_ConsVec4(l_M_0_34[0], l_M_0_34[3], l_M_0_34[6], 0));
    store4to3(l_cons__50, 3, V_ConsVec4(l_M_0_34[1], l_M_0_34[4], l_M_0_34[7], 0));
    store4to3(l_cons__50, 6, V_ConsVec4(l_M_0_34[2], l_M_0_34[5], l_M_0_34[8], 0));
    l_4nd_52 = V_FloorVec4(l_4mult_2_46);
    l_4subVec_54 = l_4mult_2_46-l_4nd_52;
    l_n_55 = vec3rtoi(l_4nd_52);
    l_baseAddr_56 = (float *)G__t_6->data;
    l_addInt_57 = ((Diderot_iunion3_t)l_n_55).i[0]+-1;
    l_Indx_1__58 = ((Diderot_iunion3_t)l_n_55).i[1];
    l_addInt_59 = l_Indx_1__58+-1;
    l_Indx_2__60 = ((Diderot_iunion3_t)l_n_55).i[2];
    l_prodInt_61 = 32*(l_Indx_2__60+-1);
    l_addPtr_62 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_59+l_prodInt_61));
    l_rp_imgLoad_63 = l_addPtr_62;
    l_4imgLoad_64 = V_ConsVec4(l_rp_imgLoad_63[0], l_rp_imgLoad_63[9], l_rp_imgLoad_63[18], l_rp_imgLoad_63[27]);
    l_addPtr_65 = l_baseAddr_56+9*(l_addInt_57+32*(l_Indx_1__58+l_prodInt_61));
    l_rp_imgLoad_66 = l_addPtr_65;
    l_4imgLoad_67 = V_ConsVec4(l_rp_imgLoad_66[0], l_rp_imgLoad_66[9], l_rp_imgLoad_66[18], l_rp_imgLoad_66[27]);
    l_addInt_68 = l_Indx_1__58+1;
    l_addPtr_69 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_68+l_prodInt_61));
    l_rp_imgLoad_70 = l_addPtr_69;
    l_4imgLoad_71 = V_ConsVec4(l_rp_imgLoad_70[0], l_rp_imgLoad_70[9], l_rp_imgLoad_70[18], l_rp_imgLoad_70[27]);
    l_addInt_72 = l_Indx_1__58+2;
    l_addPtr_73 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_72+l_prodInt_61));
    l_rp_imgLoad_74 = l_addPtr_73;
    l_4imgLoad_75 = V_ConsVec4(l_rp_imgLoad_74[0], l_rp_imgLoad_74[9], l_rp_imgLoad_74[18], l_rp_imgLoad_74[27]);
    l_prodInt_76 = 32*l_Indx_2__60;
    l_addPtr_77 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_59+l_prodInt_76));
    l_rp_imgLoad_78 = l_addPtr_77;
    l_4imgLoad_79 = V_ConsVec4(l_rp_imgLoad_78[0], l_rp_imgLoad_78[9], l_rp_imgLoad_78[18], l_rp_imgLoad_78[27]);
    l_addPtr_80 = l_baseAddr_56+9*(l_addInt_57+32*(l_Indx_1__58+l_prodInt_76));
    l_rp_imgLoad_81 = l_addPtr_80;
    l_4imgLoad_82 = V_ConsVec4(l_rp_imgLoad_81[0], l_rp_imgLoad_81[9], l_rp_imgLoad_81[18], l_rp_imgLoad_81[27]);
    l_addPtr_83 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_68+l_prodInt_76));
    l_rp_imgLoad_84 = l_addPtr_83;
    l_4imgLoad_85 = V_ConsVec4(l_rp_imgLoad_84[0], l_rp_imgLoad_84[9], l_rp_imgLoad_84[18], l_rp_imgLoad_84[27]);
    l_addPtr_86 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_72+l_prodInt_76));
    l_rp_imgLoad_87 = l_addPtr_86;
    l_4imgLoad_88 = V_ConsVec4(l_rp_imgLoad_87[0], l_rp_imgLoad_87[9], l_rp_imgLoad_87[18], l_rp_imgLoad_87[27]);
    l_prodInt_89 = 32*(l_Indx_2__60+1);
    l_addPtr_90 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_59+l_prodInt_89));
    l_rp_imgLoad_91 = l_addPtr_90;
    l_4imgLoad_92 = V_ConsVec4(l_rp_imgLoad_91[0], l_rp_imgLoad_91[9], l_rp_imgLoad_91[18], l_rp_imgLoad_91[27]);
    l_addPtr_93 = l_baseAddr_56+9*(l_addInt_57+32*(l_Indx_1__58+l_prodInt_89));
    l_rp_imgLoad_94 = l_addPtr_93;
    l_4imgLoad_95 = V_ConsVec4(l_rp_imgLoad_94[0], l_rp_imgLoad_94[9], l_rp_imgLoad_94[18], l_rp_imgLoad_94[27]);
    l_addPtr_96 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_68+l_prodInt_89));
    l_rp_imgLoad_97 = l_addPtr_96;
    l_4imgLoad_98 = V_ConsVec4(l_rp_imgLoad_97[0], l_rp_imgLoad_97[9], l_rp_imgLoad_97[18], l_rp_imgLoad_97[27]);
    l_addPtr_99 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_72+l_prodInt_89));
    l_rp_imgLoad_100 = l_addPtr_99;
    l_4imgLoad_101 = V_ConsVec4(l_rp_imgLoad_100[0], l_rp_imgLoad_100[9], l_rp_imgLoad_100[18], l_rp_imgLoad_100[27]);
    l_prodInt_102 = 32*(l_Indx_2__60+2);
    l_addPtr_103 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_59+l_prodInt_102));
    l_rp_imgLoad_104 = l_addPtr_103;
    l_4imgLoad_105 = V_ConsVec4(l_rp_imgLoad_104[0], l_rp_imgLoad_104[9], l_rp_imgLoad_104[18], l_rp_imgLoad_104[27]);
    l_addPtr_106 = l_baseAddr_56+9*(l_addInt_57+32*(l_Indx_1__58+l_prodInt_102));
    l_rp_imgLoad_107 = l_addPtr_106;
    l_4imgLoad_108 = V_ConsVec4(l_rp_imgLoad_107[0], l_rp_imgLoad_107[9], l_rp_imgLoad_107[18], l_rp_imgLoad_107[27]);
    l_addPtr_109 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_68+l_prodInt_102));
    l_rp_imgLoad_110 = l_addPtr_109;
    l_4imgLoad_111 = V_ConsVec4(l_rp_imgLoad_110[0], l_rp_imgLoad_110[9], l_rp_imgLoad_110[18], l_rp_imgLoad_110[27]);
    l_addPtr_112 = l_baseAddr_56+9*(l_addInt_57+32*(l_addInt_72+l_prodInt_102));
    l_rp_imgLoad_113 = l_addPtr_112;
    l_4imgLoad_114 = V_ConsVec4(l_rp_imgLoad_113[0], l_rp_imgLoad_113[9], l_rp_imgLoad_113[18], l_rp_imgLoad_113[27]);
    l_Indx_0__115 = ((Diderot_union4_t)l_4subVec_54).r[0];
    l_cast_116 = (float)2;
    l_Indx_1__117 = ((Diderot_union4_t)l_4subVec_54).r[1];
    l_Indx_2__118 = ((Diderot_union4_t)l_4subVec_54).r[2];
    l_4cons__120 = V_ConsVec4(l_Indx_0__115-l_cast_22, l_Indx_0__115, l_Indx_0__115-l_cast_25,
        l_Indx_0__115-l_cast_116);
    l_4cons__122 = V_ConsVec4(l_Indx_1__117-l_cast_22, l_Indx_1__117, l_Indx_1__117-l_cast_25,
        l_Indx_1__117-l_cast_116);
    l_4cons__124 = V_ConsVec4(l_Indx_2__118-l_cast_22, l_Indx_2__118, l_Indx_2__118-l_cast_25,
        l_Indx_2__118-l_cast_116);
    l_4P0_126 = V_ConsVec4(0.133333333333e1f, 0.666666666667e0f, 0.666666666667e0f, 0.133333333333e1f);
    l_4P1_128 = V_ConsVec4(-0.2e1f, 0.0f, 0.0f, 0.2e1f);
    l_4P2_130 = V_ConsVec4(0.1e1f, -0.1e1f, -0.1e1f, 0.1e1f);
    l_4P3_132 = V_ConsVec4(-0.166666666667e0f, 0.5e0f, -0.5e0f, 0.166666666667e0f);
    l_4addV_139 = l_4P0_126+l_4cons__120*(l_4P1_128+l_4cons__120*(l_4P2_130+l_4cons__120*l_4P3_132));
    l_4addV_146 = l_4P0_126+l_4cons__122*(l_4P1_128+l_4cons__122*(l_4P2_130+l_4cons__122*l_4P3_132));
    l_sumVec_200 = V_SumVec4(
        (l_4P0_126+l_4cons__124*(l_4P1_128+l_4cons__124*(l_4P2_130+l_4cons__124*l_4P3_132)))*V_ConsVec4(
            V_SumVec4(
                V_ConsVec4(V_SumVec4(l_4addV_139*l_4imgLoad_64), V_SumVec4(l_4addV_139*l_4imgLoad_67),
                    V_SumVec4(l_4addV_139*l_4imgLoad_71), V_SumVec4(l_4addV_139*l_4imgLoad_75))*l_4addV_146),
            V_SumVec4(
                V_ConsVec4(V_SumVec4(l_4addV_139*l_4imgLoad_79), V_SumVec4(l_4addV_139*l_4imgLoad_82),
                    V_SumVec4(l_4addV_139*l_4imgLoad_85), V_SumVec4(l_4addV_139*l_4imgLoad_88))*l_4addV_146),
            V_SumVec4(
                V_ConsVec4(V_SumVec4(l_4addV_139*l_4imgLoad_92), V_SumVec4(l_4addV_139*l_4imgLoad_95),
                    V_SumVec4(l_4addV_139*l_4imgLoad_98), V_SumVec4(l_4addV_139*l_4imgLoad_101))*l_4addV_146),
            V_SumVec4(
                V_ConsVec4(V_SumVec4(l_4addV_139*l_4imgLoad_105), V_SumVec4(l_4addV_139*l_4imgLoad_108),
                    V_SumVec4(l_4addV_139*l_4imgLoad_111), V_SumVec4(l_4addV_139*l_4imgLoad_114))*l_4addV_146)));
    l_mult_2_201 = l_sumVec_200*l_sumVec_200*l_sumVec_200;
    l_prodSca_202 = l_cast_22*l_mult_2_201;
    selfOut->vv = l_mult_2_201+l_mult_2_201+l_mult_2_201+l_prodSca_202+l_prodSca_202+l_prodSca_202;
    return DIDEROT_STABILIZE;
}
static void sample_Output (void *outS, Strand_sample_t *self)
{
    memcpy(outS, &self->vv, sizeof(float));
}
static void sample_Print (FILE *outS, Strand_sample_t *self)
{
    fprintf(outS, "%f\n", self->vv);
}
Strand_t Strand_sample = {.name = "sample",.stateSzb = sizeof(Strand_sample_t),.outputSzb = 4,.nrrdSzb = 4,.nrrdType = 9,.update = (update_method_t)sample_Update,.stabilize = (stabilize_method_t)sample_Stabilize,.print = (print_method_t)sample_Print,.output = (output_method_t)sample_Output,};
int32_t Diderot_NumStrands = 1;
Strand_t *Diderot_Strands[1] = {[0] = &Strand_sample,};
Diderot_World_t *Diderot_Initially ()
{
    int32_t l__t_207;
    l__t_207 = G_sz0_0-1;
    // allocate initial block of strands
    
    int32_t base[3] = {[0] = 0,[1] = 0,[2] = 0,};
    uint32_t size[3] = {[0] = l__t_207-0+1,[1] = l__t_207-0+1,[2] = l__t_207-0+1,};
    Diderot_World_t *wrld = Diderot_AllocInitially(ProgramName, &Strand_sample, true, 3, base, size);
    // initially
    
    uint32_t ix = 0;
    for (int32_t i_zi_210 = 0; i_zi_210<=l__t_207; i_zi_210++)
        for (int32_t i_yi_209 = 0; i_yi_209<=l__t_207; i_yi_209++)
            for (int32_t i_xi_208 = 0; i_xi_208<=l__t_207; i_xi_208++) {
                Strand_sample_t *sp = (Strand_sample_t *)Diderot_InState(wrld, ix);
                sample_InitState(sp, i_xi_208, i_yi_209, i_zi_210);
                ix = ix+1;
            }
    return wrld;
}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0