slm: OpenCL code base  0.1
Functions
essentials.cl File Reference

Essential functions for streamline trajectory integration. More...

Go to the source code of this file.

Functions

static float2 speed_interpolator (float2 vec, __global const float2 *uv_array)
 Bilinearly interpolate a velocity vector (choice of row-major or column-major arrays). More...
 
static uint get_array_idx (float2 vec)
 Compute the array index of the padded grid pixel pointed to by a float2 grid position vector (choice of row-major or column-major arrays). More...
 
static char2 compress (float2 raw_vector)
 Squish a float vector into a byte vector for O(<1 pixel) trajectory steps Achieved through scaling by TRAJECTORY_RESOLUTION, e.g. More...
 
static float2 uncompress (char2 compressed_vector)
 Unsquish a byte vector back to a float vector. More...
 
static float2 approximate (float2 raw_position)
 Approximate a float vector at the resolution provided by a scaled byte vector. More...
 
static float dt_to_nearest_edge (float x, float u)
 In Euler streamline integration (which is the last step), this function provides the delta time required to reach the boundary precisely in one hop. More...
 

Detailed Description

Essential functions for streamline trajectory integration.

Definition in file essentials.cl.