Jump to content

  • Log In with Google      Sign In   
  • Create Account

zfvesoljc

Member Since 13 Apr 2010
Offline Last Active Aug 08 2014 08:29 AM

Posts I've Made

In Topic: 3D Engine to analysis

29 April 2014 - 08:10 AM

you can check godot engine


In Topic: Evaluators (polynomial & graph)

07 January 2014 - 05:48 PM

Optimizing polynomial evaluator seems possible only in a way to solve multiple evaluators at once, as mentioned before. Second "downer"  is that lookup value x has to be same for all evaluators. So, something as:

class QuadPolynomEvaluator {
private:
   vec4 PolyConst[4]; // vec4 for polynomial of degree 4, array of 4 for 4 evaluators (e0, e1, e2, e3)
public:
   // @ either build time or load time
   void SetEvalData(uint idx, float c0, float c1, float c2, float c3)
   {
      // quick and dirty way of filling components; or use "proper" store/splat/swizzle
      float* data= (float*)&PolyConst;
      data[ 0*4 + idx ] = c0;
      data[ 1*4 + idx ] = c1;
      data[ 2*4 + idx ] = c2;
      data[ 3*4 + idx ] = c3;
      // PolyConst[0] = e0.c0, e1.c0, e2.c0, e3.c0
      // PolyConst[1] = e0.c1, e1.c1, e2.c1, e3.c1
      // PolyConst[2] = e0.c2, e1.c2, e2.c2, e3.c2
      // PolyConst[3] = e0.c3, e1.c3, e2.c3, e3.c3
   }
   vec4 Evaluate(float x)
   {
      vec4 vx = vec4(x);
      // result.x = (e0.c0) + (e0.c1 * x) + (e0.c2 * pow(x, 2.0f)) + (e0.c2 * pow(x, 3.0f));
      vec4 result = PolyConst[0];
      result = vec4add( result, vec4mul( PolyConst[1], vx ) );
      result = vec4add( result, vec4mul( PolyConst[2], vec4pow( vx, vec4(2.0f) ) ) );
      result = vec4add( result, vec4mul( PolyConst[3], vec4pow( vx, vec4(3.0f) ) ) );
      return result;
   }
};

Makes sense?


In Topic: redesigning the sse

06 January 2014 - 03:55 AM

for example there is no as far as i know command for horizontal multiply
that would just mul a1*a2*a3*a4

 

Sometimes you just need to rearrange the data. The benefits of simd ops do no come from a1*a2*a3*a4 but rather from:

v1(a1,b1,c1,d1);
v2(a2,b2,c2,d2);
v3(a3,b3,c3,d3);
v4(a4,b4,c4,d4);

v5 = vec4mul( v1, vec4mul( v2, vec4mul( v3, v4 ) ) );
// v5( a1*a2*a3*a4, b1*b2*b3*b4, c1*c2*c3*c4, d1*d2*d3*d4 )

In Topic: Simulation RTS Resource chains

25 November 2013 - 02:43 AM

I'd just use real world materials for starting point and expand them with sci-fi/fantasy ones later on.


In Topic: tomcat server (or like) on top of webserver

28 October 2013 - 04:31 AM

Well as I understand it, we are calling java code from js:

<%
javafunc();
%> 

PARTNERS