   return v;
 }
 
-__device__ float3 add(float3 a, float3 b){
+__device__ __host__ float3 add(float3 a, float3 b){
   a.x += b.x;
   a.y += b.y;
   a.z += b.z;

}

// Checks if position is inside the volume (float3 and int3 versions)
__device__ int inside(float3 pos){
  int x = (pos.x >= 0 && pos.x < DATA_DIM-1);
  int y = (pos.y >= 0 && pos.y < DATA_DIM-1);
  int z = (pos.z >= 0 && pos.z < DATA_DIM-1);

  return a;
}

__device__ __host__ float3 scale(float3 a, float b){
  a.x *= b;
  a.y *= b;
  a.z *= b;
