Skip to content

Commit 703f404

Browse files
committed
Add CeedScalarArray to types.h
1 parent 36d404f commit 703f404

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

backends/cuda-ref/ceed-cuda-vector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ static inline int CeedVectorSyncD2H_Cuda(const CeedVector vec) {
113113
// Sync arrays
114114
//------------------------------------------------------------------------------
115115
static int CeedVectorSyncArrayGeneric_Cuda(const CeedVector vec,
116-
CeedMemType mem_type,
117-
CeedScalarType prec) {
116+
CeedMemType mem_type,
117+
CeedScalarType prec) {
118118
int ierr;
119119
// Check whether device/host sync is needed
120120
bool need_sync = false;

include/ceed/types.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,14 @@ typedef enum {
113113
CEED_SCALAR_FP32,
114114
/// Double precision
115115
CEED_SCALAR_FP64
116+
/// Total number of allowed scalar precision types
117+
CEED_NUM_PRECISIONS,
116118
} CeedScalarType;
119+
/// Struct for holding data in multiple precisions for mixed-precision-enabled
120+
/// backends
121+
typedef struct {
122+
void *values[CEED_NUM_PRECISIONS]; // Size equals CEED_NUM_PRECISIONS
123+
} CeedScalarArray;
117124
/// Base scalar type for the library to use: change which header is
118125
/// included to change the precision.
119126
#include "ceed-f64.h"

0 commit comments

Comments
 (0)