mirror of
https://github.com/paboyle/Grid.git
synced 2026-05-25 19:44:17 +01:00
Fix Zero() used on thrust::complex in WordBundle4 initialisation
Grid's Zero() sentinel is not assignable to thrust::complex<double>; use scalarD(0) instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -143,7 +143,7 @@ inline typename vobj::scalar_objectD sumD_gpu_large(const vobj *lat, Integer osi
|
||||
R4 *buf_p = &buf[0];
|
||||
|
||||
R4 zero4;
|
||||
zero4.w[0] = zero4.w[1] = zero4.w[2] = zero4.w[3] = Zero();
|
||||
zero4.w[0] = zero4.w[1] = zero4.w[2] = zero4.w[3] = scalarD(0);
|
||||
|
||||
R4 *d_out = static_cast<R4 *>(acceleratorAllocDevice(sizeof(R4)));
|
||||
void *d_temp = nullptr;
|
||||
@@ -192,7 +192,7 @@ inline typename vobj::scalar_objectD sumD_gpu_large(const vobj *lat, Integer osi
|
||||
int base = 4 * nfull;
|
||||
accelerator_for(ss, osites, 1, {
|
||||
R4 r4;
|
||||
r4.w[0] = r4.w[1] = r4.w[2] = r4.w[3] = Zero();
|
||||
r4.w[0] = r4.w[1] = r4.w[2] = r4.w[3] = scalarD(0);
|
||||
for (int k = 0; k < rem; k++)
|
||||
r4.w[k] = TensorRemove(Reduce(idat[ss * words + base + k]));
|
||||
buf_p[ss] = r4;
|
||||
|
||||
Reference in New Issue
Block a user