 
 __device__ void fa2UpdateSpeedGraph(float gswing, float gtract, float* gspeed)
 {
-  // This code is executed by one thread.
-  if (threadIdx.x + blockIdx.x == 0)
-  {
     float oldSpeed = *gspeed;
     *gspeed = gswing > 0 ? TAU * (gtract / gswing) : EPSILON;
     if (*gspeed <= 0)

  cudaMemset(dispY, 0, g->numvertices * sizeof(float));
  cudaMemset(graphSwing, 0, sizeof(float));
  cudaMemset(graphTract, 0, sizeof(float));

  cudaMalloc(&vxLocs, g->numvertices * sizeof(float));
  cudaMalloc(&vyLocs, g->numvertices * sizeof(float));

        dispX,
        dispY,
        graphSwing,
        graphTract,
        graphSpeed);
  }

  // Update graph with new vertex positions.
