Reduction test pipeline added to mpitest, Error struct changed: new label field
- CHANGED: Error struct has a new label field for labeling an error - The label is what is printed to screen - vtxbuf name lookup moved out of printErrorToScreen/print_error_to_screen - NEW: acScalReductionTestCase and acVecReductionTestCase - Define new test cases by adding them to a list in samples/mpitest/main.cc:main - Minor style change in verification.c to make all Verification functions similar and fit one screen
This commit is contained in:
@@ -29,9 +29,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define ERROR_LABEL_LENGTH 30
|
||||
|
||||
typedef struct {
|
||||
char label[ERROR_LABEL_LENGTH];
|
||||
VertexBufferHandle handle;
|
||||
AcReal model;
|
||||
AcReal candidate;
|
||||
@@ -42,6 +45,22 @@ typedef struct {
|
||||
AcReal minimum_magnitude;
|
||||
} Error;
|
||||
|
||||
typedef struct {
|
||||
char label[ERROR_LABEL_LENGTH];
|
||||
VertexBufferHandle vtxbuf;
|
||||
ReductionType rtype;
|
||||
AcReal candidate;
|
||||
} AcScalReductionTestCase;
|
||||
|
||||
typedef struct {
|
||||
char label[ERROR_LABEL_LENGTH];
|
||||
VertexBufferHandle a;
|
||||
VertexBufferHandle b;
|
||||
VertexBufferHandle c;
|
||||
ReductionType rtype;
|
||||
AcReal candidate;
|
||||
} AcVecReductionTestCase;
|
||||
|
||||
/** TODO comment */
|
||||
Error acGetError(AcReal model, AcReal candidate);
|
||||
|
||||
@@ -76,17 +95,20 @@ AcResult acMeshClear(AcMesh* mesh);
|
||||
AcResult acModelIntegrateStep(AcMesh mesh, const AcReal dt);
|
||||
|
||||
/** TODO */
|
||||
AcReal
|
||||
acModelReduceScal(const AcMesh mesh, const ReductionType rtype, const VertexBufferHandle a);
|
||||
AcReal acModelReduceScal(const AcMesh mesh, const ReductionType rtype, const VertexBufferHandle a);
|
||||
|
||||
/** TODO */
|
||||
AcReal
|
||||
acModelReduceVec(const AcMesh mesh, const ReductionType rtype, const VertexBufferHandle a,
|
||||
const VertexBufferHandle b, const VertexBufferHandle c);
|
||||
AcReal acModelReduceVec(const AcMesh mesh, const ReductionType rtype, const VertexBufferHandle a, const VertexBufferHandle b, const VertexBufferHandle c);
|
||||
|
||||
/** */
|
||||
AcResult acVerifyMesh(const AcMesh model, const AcMesh candidate);
|
||||
|
||||
/** */
|
||||
AcResult acVerifyScalReductions(const AcMesh model, const AcScalReductionTestCase* testCases, const size_t numCases);
|
||||
|
||||
/** */
|
||||
AcResult acVerifyVecReductions(const AcMesh model, const AcVecReductionTestCase* testCases, const size_t numCases);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user