MCPcopy Index your code
hub / github.com/uber/aresdb / copyHostToDevice

Function copyHostToDevice

query/aql_processor.go:1323–1346  ·  view source on GitHub ↗

copyHostToDevice copy vector party slice to device vector party slice

(vps memCom.HostVectorPartySlice, deviceVPSlice deviceVectorPartySlice, stream unsafe.Pointer, device int)

Source from the content-addressed store, hash-verified

1321
1322// copyHostToDevice copy vector party slice to device vector party slice
1323func copyHostToDevice(vps memCom.HostVectorPartySlice, deviceVPSlice deviceVectorPartySlice, stream unsafe.Pointer, device int) (bytesCopied, numTransfers int) {
1324 if vps.ValueBytes > 0 {
1325 cgoutils.AsyncCopyHostToDevice(
1326 deviceVPSlice.values.getPointer(), vps.Values, vps.ValueBytes,
1327 stream, device)
1328 bytesCopied += vps.ValueBytes
1329 numTransfers++
1330 }
1331 if vps.NullBytes > 0 {
1332 cgoutils.AsyncCopyHostToDevice(
1333 deviceVPSlice.nulls.getPointer(), vps.Nulls, vps.NullBytes,
1334 stream, device)
1335 bytesCopied += vps.NullBytes
1336 numTransfers++
1337 }
1338 if vps.CountBytes > 0 {
1339 cgoutils.AsyncCopyHostToDevice(
1340 deviceVPSlice.counts.getPointer(), vps.Counts, vps.CountBytes,
1341 stream, device)
1342 bytesCopied += vps.CountBytes
1343 numTransfers++
1344 }
1345 return
1346}
1347
1348func hostToDeviceColumn(hostColumn memCom.HostVectorPartySlice, device int) deviceVectorPartySlice {
1349 deviceColumn := deviceVectorPartySlice{

Callers 4

prepareForeignTableMethod · 0.85
transferLiveBatchMethod · 0.85
transferArchiveBatchMethod · 0.85
readDeviceVPSliceFunction · 0.85

Calls 2

AsyncCopyHostToDeviceFunction · 0.92
getPointerMethod · 0.80

Tested by 1

readDeviceVPSliceFunction · 0.68