       cudaFree(dev_mem);
       return result;
     }
-    result      = cudaMemcpy(dev_mem + sizeof(afTimeCurve_t), src->pairs, src->count * sizeof(afTimeCurvePair_t), cudaMemcpyHostToDevice);
+    result      = cudaMemcpy((char*)dev_mem + sizeof(afTimeCurve_t), src->pairs, src->count * sizeof(afTimeCurvePair_t), cudaMemcpyHostToDevice);
     if (result != cudaSuccess) {
       // Try and free the allocated memory.
       cudaFree(dev_mem);

  }
}

__host__
cudaError_t af_TimeCurveCopyToHost(afTimeCurve_t* src, afTimeCurve_t** dst, bool assume_contiguous, int count) {
  void* host_mem;
  cudaError_t result;
  // If it's not contiguous then we'll assume it has a count of 0
  // which means we'll only download the curve struct.
  // From there we'll be able to download the correct array for the pairs.

}

__host__
cudaError_t af_TimeCurveCopyToDevice(afTimeCurve_t* src, afTimeCurve_t** dst) {
  void* dev_mem;
  cudaError_t result;
  // We attempt to put a whole curve in a contiguous block of memory.
