Renamed all references to uniforms to f.ex. loadScalarConstant -> loadScalarUniform (for consistency with the DSL)
This commit is contained in:
@@ -200,13 +200,13 @@ AcResult acDeviceTransferVertexBufferWithOffset(const Device src_device, const S
|
|||||||
|
|
||||||
Loading uniforms (device constants)
|
Loading uniforms (device constants)
|
||||||
```C
|
```C
|
||||||
AcResult acDeviceLoadScalarConstant(const Device device, const Stream stream,
|
AcResult acDeviceLoadScalarUniform(const Device device, const Stream stream,
|
||||||
const AcRealParam param, const AcReal value);
|
const AcRealParam param, const AcReal value);
|
||||||
AcResult acDeviceLoadVectorConstant(const Device device, const Stream stream,
|
AcResult acDeviceLoadVectorUniform(const Device device, const Stream stream,
|
||||||
const AcReal3Param param, const AcReal3 value);
|
const AcReal3Param param, const AcReal3 value);
|
||||||
AcResult acDeviceLoadIntConstant(const Device device, const Stream stream, const AcIntParam param,
|
AcResult acDeviceLoadIntUniform(const Device device, const Stream stream, const AcIntParam param,
|
||||||
const int value);
|
const int value);
|
||||||
AcResult acDeviceLoadInt3Constant(const Device device, const Stream stream, const AcInt3Param param,
|
AcResult acDeviceLoadInt3Uniform(const Device device, const Stream stream, const AcInt3Param param,
|
||||||
const int3 value);
|
const int3 value);
|
||||||
AcResult acDeviceLoadScalarArray(const Device device, const Stream stream,
|
AcResult acDeviceLoadScalarArray(const Device device, const Stream stream,
|
||||||
const ScalarArrayHandle handle, const AcReal* data,
|
const ScalarArrayHandle handle, const AcReal* data,
|
||||||
|
@@ -46,19 +46,19 @@ AcResult acDeviceSynchronizeStream(const Device device, const Stream stream);
|
|||||||
AcResult acDeviceSwapBuffers(const Device device);
|
AcResult acDeviceSwapBuffers(const Device device);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acDeviceLoadScalarConstant(const Device device, const Stream stream,
|
AcResult acDeviceLoadScalarUniform(const Device device, const Stream stream,
|
||||||
const AcRealParam param, const AcReal value);
|
const AcRealParam param, const AcReal value);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acDeviceLoadVectorConstant(const Device device, const Stream stream,
|
AcResult acDeviceLoadVectorUniform(const Device device, const Stream stream,
|
||||||
const AcReal3Param param, const AcReal3 value);
|
const AcReal3Param param, const AcReal3 value);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acDeviceLoadIntConstant(const Device device, const Stream stream, const AcIntParam param,
|
AcResult acDeviceLoadIntUniform(const Device device, const Stream stream, const AcIntParam param,
|
||||||
const int value);
|
const int value);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acDeviceLoadInt3Constant(const Device device, const Stream stream, const AcInt3Param param,
|
AcResult acDeviceLoadInt3Uniform(const Device device, const Stream stream, const AcInt3Param param,
|
||||||
const int3 value);
|
const int3 value);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
|
@@ -357,7 +357,7 @@ acDeviceAutoOptimize(const Device device)
|
|||||||
|
|
||||||
cudaEventRecord(tstart); // ---------------------------------------- Timing start
|
cudaEventRecord(tstart); // ---------------------------------------- Timing start
|
||||||
|
|
||||||
acDeviceLoadScalarConstant(device, STREAM_DEFAULT, AC_dt, FLT_EPSILON);
|
acDeviceLoadScalarUniform(device, STREAM_DEFAULT, AC_dt, FLT_EPSILON);
|
||||||
for (int i = 0; i < num_iterations; ++i)
|
for (int i = 0; i < num_iterations; ++i)
|
||||||
solve<2><<<bpg, tpb>>>(start, end, device->vba);
|
solve<2><<<bpg, tpb>>>(start, end, device->vba);
|
||||||
|
|
||||||
@@ -416,7 +416,7 @@ acDeviceSwapBuffers(const Device device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcResult
|
AcResult
|
||||||
acDeviceLoadScalarConstant(const Device device, const Stream stream, const AcRealParam param,
|
acDeviceLoadScalarUniform(const Device device, const Stream stream, const AcRealParam param,
|
||||||
const AcReal value)
|
const AcReal value)
|
||||||
{
|
{
|
||||||
cudaSetDevice(device->id);
|
cudaSetDevice(device->id);
|
||||||
@@ -427,7 +427,7 @@ acDeviceLoadScalarConstant(const Device device, const Stream stream, const AcRea
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcResult
|
AcResult
|
||||||
acDeviceLoadVectorConstant(const Device device, const Stream stream, const AcReal3Param param,
|
acDeviceLoadVectorUniform(const Device device, const Stream stream, const AcReal3Param param,
|
||||||
const AcReal3 value)
|
const AcReal3 value)
|
||||||
{
|
{
|
||||||
cudaSetDevice(device->id);
|
cudaSetDevice(device->id);
|
||||||
@@ -438,7 +438,7 @@ acDeviceLoadVectorConstant(const Device device, const Stream stream, const AcRea
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcResult
|
AcResult
|
||||||
acDeviceLoadIntConstant(const Device device, const Stream stream, const AcIntParam param,
|
acDeviceLoadIntUniform(const Device device, const Stream stream, const AcIntParam param,
|
||||||
const int value)
|
const int value)
|
||||||
{
|
{
|
||||||
cudaSetDevice(device->id);
|
cudaSetDevice(device->id);
|
||||||
@@ -449,7 +449,7 @@ acDeviceLoadIntConstant(const Device device, const Stream stream, const AcIntPar
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcResult
|
AcResult
|
||||||
acDeviceLoadInt3Constant(const Device device, const Stream stream, const AcInt3Param param,
|
acDeviceLoadInt3Uniform(const Device device, const Stream stream, const AcInt3Param param,
|
||||||
const int3 value)
|
const int3 value)
|
||||||
{
|
{
|
||||||
cudaSetDevice(device->id);
|
cudaSetDevice(device->id);
|
||||||
@@ -670,7 +670,7 @@ acDeviceIntegrateSubstep(const Device device, const Stream stream, const int ste
|
|||||||
(unsigned int)ceil(n.y / AcReal(tpb.y)), //
|
(unsigned int)ceil(n.y / AcReal(tpb.y)), //
|
||||||
(unsigned int)ceil(n.z / AcReal(tpb.z)));
|
(unsigned int)ceil(n.z / AcReal(tpb.z)));
|
||||||
|
|
||||||
acDeviceLoadScalarConstant(device, stream, AC_dt, dt);
|
acDeviceLoadScalarUniform(device, stream, AC_dt, dt);
|
||||||
if (step_number == 0)
|
if (step_number == 0)
|
||||||
solve<0><<<bpg, tpb, 0, device->streams[stream]>>>(start, end, device->vba);
|
solve<0><<<bpg, tpb, 0, device->streams[stream]>>>(start, end, device->vba);
|
||||||
else if (step_number == 1)
|
else if (step_number == 1)
|
||||||
|
@@ -429,7 +429,7 @@ acNodeLoadConstant(const Node node, const Stream stream, const AcRealParam param
|
|||||||
acNodeSynchronizeStream(node, stream);
|
acNodeSynchronizeStream(node, stream);
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < node->num_devices; ++i) {
|
for (int i = 0; i < node->num_devices; ++i) {
|
||||||
acDeviceLoadScalarConstant(node->devices[i], stream, param, value);
|
acDeviceLoadScalarUniform(node->devices[i], stream, param, value);
|
||||||
}
|
}
|
||||||
return AC_SUCCESS;
|
return AC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user