From 4c8fdec9be6d42d8d94b43bdcf1b0d7ada030a46 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 20 Jun 2020 15:23:23 +0200 Subject: Deprecate MomentsVertexBuffer Not necessary and failed on some systems for some unknown reason. --- template/opengl.mako | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'template') diff --git a/template/opengl.mako b/template/opengl.mako index 6958db8..daf5f66 100644 --- a/template/opengl.mako +++ b/template/opengl.mako @@ -13,49 +13,7 @@ def moments_cell(): 2: '(int2)(get_global_id(0), get_global_id(1))', 3: '(int4)(get_global_id(0), get_global_id(1), get_global_id(2), 0)' }.get(descriptor.d) -%> - -__kernel void collect_gl_moments(__global ${float_type}* f, - __global int* material, - __global float4* moments) -{ - const unsigned int gid = ${gid()}; - - __global ${float_type}* preshifted_f = f + gid; - -% for i in range(0,descriptor.q): - const ${float_type} f_curr_${i} = preshifted_f[${pop_offset(i)}]; -% endfor - -% for i, expr in enumerate(moments_subexpr): - const ${float_type} ${expr[0]} = ${ccode(expr[1])}; -% endfor - - float4 data; - - if (material[gid] == 1) { -% if descriptor.d == 2: - data.x = ${ccode(moments_assignment[0].rhs)}; - data.y = ${ccode(moments_assignment[1].rhs)}; - data.z = ${ccode(moments_assignment[2].rhs)}; - data.w = sqrt(data.y*data.y + data.z*data.z); -% elif descriptor.d == 3: - data.x = ${ccode(moments_assignment[0].rhs)}; - data.y = ${ccode(moments_assignment[1].rhs)}; - data.z = ${ccode(moments_assignment[2].rhs)}; - data.w = ${ccode(moments_assignment[3].rhs)}; -% endif - } else { - data.x = 0.0; - data.y = 0.0; - data.z = 0.0; - data.w = -material[gid]; - } - - moments[gid] = data; -} -<% def neighbor_offset(c_i): return { 2: lambda: c_i[1]*memory.size_x + c_i[0], -- cgit v1.2.3