Skip to content

Commit

Permalink
minor - header consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylt committed Oct 18, 2024
1 parent 9c25dd6 commit 6a96780
Show file tree
Hide file tree
Showing 71 changed files with 12 additions and 93 deletions.
2 changes: 1 addition & 1 deletion backends/avx/ceed-avx-tensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <immintrin.h>
#include <stdbool.h>

#ifdef CEED_F64_H
#ifdef CEED_SCALAR_IS_FP64
#define rtype __m256d
#define loadu _mm256_loadu_pd
#define storeu _mm256_storeu_pd
Expand Down
7 changes: 3 additions & 4 deletions include/ceed/ceed-f32.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
/// @file
/// Public header for definitions related to using FP32 floating point (single precision) for CeedScalar.
/// Include this header in ceed.h to use float instead of double.
#ifndef CEED_F32_H
#define CEED_F32_H
#pragma once

#define CEED_SCALAR_IS_FP32

/// Set base scalar type to FP32. (See CeedScalarType enum in ceed.h for all options.)
#define CEED_SCALAR_TYPE CEED_SCALAR_FP32
typedef float CeedScalar;

/// Machine epsilon
#define CEED_EPSILON 6e-08

#endif // CEED_F32_H
7 changes: 3 additions & 4 deletions include/ceed/ceed-f64.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
/// @file
/// Public header for definitions related to using FP64 floating point (double precision) for CeedScalar.
/// This is the default header included in ceed.h.
#ifndef CEED_F64_H
#define CEED_F64_H
#pragma once

#define CEED_SCALAR_IS_FP64

/// Set base scalar type to FP64. (See CeedScalarType enum in ceed.h for all options.)
#define CEED_SCALAR_TYPE CEED_SCALAR_FP64
typedef double CeedScalar;

/// Machine epsilon
#define CEED_EPSILON 1e-16

#endif // CEED_F64_H
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-atomic-add-fallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA atomic add fallback definition

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-gen-templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA backend macro and type definitions for JiT source

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA non-tensor product basis templates

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-ref-basis-nontensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA non-tensor product basis

#include <ceed/types.h>

#include "cuda-ref-basis-nontensor-templates.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA tensor product basis with AtPoints evaluation

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-ref-basis-tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA tensor product basis

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-ref-operator-assemble.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA operator full assembly

#include <ceed/types.h>

#if USE_CEEDSIZE
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-ref-qfunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA backend QFunction read/write kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA offset element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA curl-oriented element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-ref-restriction-offset.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA offset element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA oriented element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA strided element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA shared memory basis read/write templates

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA shared memory tensor product basis templates

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/cuda/cuda-shared-basis-tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA shared memory tensor product basis

#include <ceed/types.h>

#include "cuda-shared-basis-read-write-templates.h"
Expand Down
5 changes: 1 addition & 4 deletions include/ceed/jit-source/cuda/cuda-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

/// @file
/// Internal header for CUDA type definitions
#ifndef CEED_CUDA_TYPES_H
#define CEED_CUDA_TYPES_H
#pragma once

#include <ceed/types.h>

Expand All @@ -31,5 +30,3 @@ typedef struct {
CeedInt t_id;
CeedScalar *slice;
} SharedData_Cuda;

#endif // CEED_CUDA_TYPES_H
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-identity.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Identity QFunction that copies inputs directly into outputs
**/

#include <ceed/types.h>

typedef struct {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-mass1dbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for building the geometric data for the 1D mass matrix
**/

#include <ceed/types.h>

CEED_QFUNCTION(Mass1DBuild)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-mass2dbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for building the geometric data for the 2D mass matrix
**/

#include <ceed/types.h>

CEED_QFUNCTION(Mass2DBuild)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-mass3dbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for building the geometric data for the 3D mass matrix
**/

#include <ceed/types.h>

CEED_QFUNCTION(Mass3DBuild)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-massapply.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the mass matrix
**/

#include <ceed/types.h>

CEED_QFUNCTION(MassApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-poisson1dapply.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the 1D Poisson operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Poisson1DApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-poisson1dbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for building the geometric data for the 1D Poisson operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Poisson1DBuild)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-poisson2dapply.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the 2D Poisson operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Poisson2DApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-poisson2dbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for building the geometric data for the 2D Poisson operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Poisson2DBuild)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-poisson3dapply.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the geometric data for the 3D Poisson operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Poisson3DApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-poisson3dbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for building the geometric data for the 3D Poisson operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Poisson3DBuild)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-scale.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Scaling QFunction that scales inputs
**/

#include <ceed/types.h>

CEED_QFUNCTION(Scale)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/gallery/ceed-vectormassapply.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the mass matrix on a vector system with three components
**/

#include <ceed/types.h>

CEED_QFUNCTION(Vector3MassApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the 1D Poisson operator on a vector system with three components
**/

#include <ceed/types.h>

CEED_QFUNCTION(Vector3Poisson1DApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the 2D Poisson operator on a vector system with three components
**/

#include <ceed/types.h>

CEED_QFUNCTION(Vector3Poisson2DApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/**
@brief Ceed QFunction for applying the geometric data for the 3D Poisson on a vector system with three components operator
**/

#include <ceed/types.h>

CEED_QFUNCTION(Vector3Poisson3DApply)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/hip/hip-gen-templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP backend macro and type definitions for JiT source

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP non-tensor product basis templates

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/hip/hip-ref-basis-nontensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP non-tensor product basis

#include <ceed/types.h>

#include "hip-ref-basis-nontensor-templates.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for CUDA tensor product basis with AtPoints evaluation

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/hip/hip-ref-basis-tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP tensor product basis

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP operator diagonal assembly

#include <ceed/types.h>

#if USE_CEEDSIZE
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/hip/hip-ref-operator-assemble.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP operator full assembly

#include <ceed/types.h>

#if USE_CEEDSIZE
Expand Down
1 change: 0 additions & 1 deletion include/ceed/jit-source/hip/hip-ref-qfunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP backend QFunction read/write kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP offset element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

/// @file
/// Internal header for HIP curl-oriented element restriction kernels

#include <ceed/types.h>

//------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 6a96780

Please sign in to comment.