Added a function for loading ScalarArrays to the GPU
This commit is contained in:
@@ -61,6 +61,11 @@ AcResult acDeviceLoadIntConstant(const Device device, const Stream stream, const
|
|||||||
AcResult acDeviceLoadInt3Constant(const Device device, const Stream stream, const AcInt3Param param,
|
AcResult acDeviceLoadInt3Constant(const Device device, const Stream stream, const AcInt3Param param,
|
||||||
const int3 value);
|
const int3 value);
|
||||||
|
|
||||||
|
/** */
|
||||||
|
AcResult acDeviceLoadScalarArray(const Device device, const Stream stream,
|
||||||
|
const ScalarArrayHandle handle, const AcReal* data,
|
||||||
|
const size_t num);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acDeviceLoadMeshInfo(const Device device, const Stream stream,
|
AcResult acDeviceLoadMeshInfo(const Device device, const Stream stream,
|
||||||
const AcMeshInfo device_config);
|
const AcMeshInfo device_config);
|
||||||
|
@@ -447,6 +447,16 @@ acDeviceLoadInt3Constant(const Device device, const Stream stream, const AcInt3P
|
|||||||
return AC_SUCCESS;
|
return AC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AcResult
|
||||||
|
acDeviceLoadScalarArray(const Device device, const Stream stream, const ScalarArrayHandle handle,
|
||||||
|
const AcReal* data, const size_t num)
|
||||||
|
{
|
||||||
|
cudaSetDevice(device->id);
|
||||||
|
ERRCHK_CUDA(cudaMemcpyAsync(device->vba.profiles[handle], data, sizeof(data[0]) * num,
|
||||||
|
cudaMemcpyHostToDevice, device->streams[stream]));
|
||||||
|
return AC_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
AcResult
|
AcResult
|
||||||
acDeviceLoadMeshInfo(const Device device, const Stream stream, const AcMeshInfo device_config)
|
acDeviceLoadMeshInfo(const Device device, const Stream stream, const AcMeshInfo device_config)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user