diff --git a/lib/cuda_color_spinor_field.cu b/lib/cuda_color_spinor_field.cu index 3e1bdb1581..846cee613d 100644 --- a/lib/cuda_color_spinor_field.cu +++ b/lib/cuda_color_spinor_field.cu @@ -217,11 +217,21 @@ namespace quda { even = new cudaColorSpinorField(*this, param); odd = new cudaColorSpinorField(*this, param); - // need this hackery for the moment (need to locate the odd pointer half way into the full field) + // need this hackery for the moment (need to locate the odd pointers half way into the full field) (dynamic_cast(odd))->v = (void*)((char*)v + bytes/2); if (precision == QUDA_HALF_PRECISION) (dynamic_cast(odd))->norm = (void*)((char*)norm + norm_bytes/2); + for(int i=0; i(odd))->ghost[i] = + static_cast((dynamic_cast(odd))->ghost[i]) + bytes/2; + if(precision == QUDA_HALF_PRECISION) + (dynamic_cast(odd))->ghostNorm[i] = + static_cast((dynamic_cast(odd))->ghostNorm[i]) + norm_bytes/2; + } + } + #ifdef USE_TEXTURE_OBJECTS dynamic_cast(even)->destroyTexObject(); dynamic_cast(even)->createTexObject();