Skip to content

Commit d4a4636

Browse files
committed
format
1 parent a1fc317 commit d4a4636

File tree

14 files changed

+27
-49
lines changed

14 files changed

+27
-49
lines changed

Intern/rayx-core/src/Design/DesignElement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ struct RAYX_API DesignElement : public BeamlineNode {
240240

241241
void setRoughnessSubstrate(double value);
242242
double getRoughnessSubstrate() const;
243-
243+
244244
void setDesignPlane(DesignPlane value);
245245
DesignPlane getDesignPlane() const;
246246
};

Intern/rayx-core/src/Design/Value.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ class RAYX_API DesignMap {
240240
private:
241241
std::variant<Undefined, double, int, ElectronEnergyOrientation, glm::dvec4, glm::dmat4x4, bool, EnergyDistributionType, Misalignment,
242242
CentralBeamstop, Cutout, CutoutType, EventType, CylinderDirection, FigureRotation, Map, Surface, CurvatureType, SourceDist,
243-
SpreadType, Rad, Material, EnergySpreadUnit, std::string, SigmaType, BehaviourType, ElementType, GratingMount, CrystalType, DesignPlane>
243+
SpreadType, Rad, Material, EnergySpreadUnit, std::string, SigmaType, BehaviourType, ElementType, GratingMount, CrystalType,
244+
DesignPlane>
244245
m_variant;
245246
};
246247

Intern/rayx-core/src/Element/Behaviour.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ namespace RAYX {
99

1010
// A behaviour decides what happens whenever a ray hits the surface of this element.
1111
// Each behaviour type has its own `behave` function in `Behave.h`.
12-
enum class BehaveType {
13-
Mirror,
14-
Grating,
15-
Slit,
16-
RZP,
17-
ImagePlane,
18-
Crystal,
19-
Foil
20-
};
12+
enum class BehaveType { Mirror, Grating, Slit, RZP, ImagePlane, Crystal, Foil };
2113

2214
struct Behaviour {
2315
// the type of this behaviour, see the BTYPE constants.
@@ -272,7 +264,7 @@ inline CrystalBehaviour deserializeCrystal(const Behaviour& b) {
272264
////////////////
273265

274266
struct FoilBehaviour {
275-
//Substrates
267+
// Substrates
276268
double m_thicknessSubstrate;
277269
double m_roughnessSubstrate;
278270
};

Intern/rayx-core/src/Element/Element.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ inline glm::dmat4x4 defaultOutMatrix(const DesignElement& dele, DesignPlane plan
5353

5454
inline int defaultMaterial(const DesignElement& dele) { return static_cast<int>(dele.getMaterial()); }
5555

56-
OpticalElement makeElement(const DesignElement& dele, Behaviour behaviour, Surface surface, DesignPlane plane, std::optional<Cutout> cutout ) {
56+
OpticalElement makeElement(const DesignElement& dele, Behaviour behaviour, Surface surface, DesignPlane plane, std::optional<Cutout> cutout) {
5757
if (!cutout) {
5858
cutout = dele.getCutout();
5959
}

Intern/rayx-core/src/Element/Element.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RAYX_API glm::dmat4 calcTransformationMatrices(glm::dvec4 position, glm::dmat4 o
6565

6666
// constructs an OpticalElement given all of its components. Some information that is not explicitly given, will be parsed from the ` dele`.
6767
OpticalElement makeElement(const DesignElement& dele, Behaviour behaviour, Surface surface, DesignPlane plane = DesignPlane::XZ,
68-
std::optional<Cutout> cutout = {});
68+
std::optional<Cutout> cutout = {});
6969

7070
extern std::map<ElementType, std::string> RAYX_API ElementStringMap;
7171
ElementType RAYX_API findElementString(const std::string& name);

Intern/rayx-core/src/Element/Surface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Surface makeEllipsoid(const DesignElement& dele); //< creates a Ellipsoid from
3333
Surface makeCone(const DesignElement& dele); //< creates a Cone from the parameters given in ` dele`.
3434
Surface makeCylinder(const DesignElement& dele); //< creates a Cylinder from the parameters given in ` dele`.
3535
Surface makeSphere(double radius); //< creates a sphere from the radius .
36-
Surface makePlane(); //< creates a plane surface
36+
Surface makePlane(); //< creates a plane surface
3737
Surface makeParaboloid(const DesignElement& dele); //< creates a Paraboloid from the parameters given in ` dele`.
3838

3939
///////////////////

Intern/rayx-core/src/Rml/xml.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ struct RAYX_API Parser {
213213
inline double parseThicknessSubstrate() const { return parseDouble("thicknessSubstrate"); }
214214
inline double parseRoughnessSubstrate() const { return parseDouble("roughnessSubstrate"); }
215215
inline double parseDensitySubstrate() const { return parseDouble("densitySubstrate"); }
216-
217-
216+
218217
// the XML node of the object you intend to parse.
219218
rapidxml::xml_node<>* node;
220219

Intern/rayx-core/src/Tracer/DeviceTracer.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99

1010
namespace RAYX {
1111

12-
// Small helper to make passing the full record mask easier.
13-
inline std::vector<bool> fullRecordMask(size_t numElements) {
14-
return std::vector<bool>(numElements, true);
15-
}
12+
// Small helper to make passing the full record mask easier.
13+
inline std::vector<bool> fullRecordMask(size_t numElements) { return std::vector<bool>(numElements, true); }
1614

1715
/**
1816
* @brief DeviceTracer is an interface to a tracer implementation
@@ -22,13 +20,8 @@ class RAYX_API DeviceTracer {
2220
public:
2321
virtual ~DeviceTracer() = default;
2422

25-
virtual RaySoA trace(
26-
const Group& beamline,
27-
Sequential sequential,
28-
const int maxBatchSize,
29-
const int maxEvents,
30-
const std::vector<bool>& recordMask,
31-
const RayAttrFlag attr) = 0;
23+
virtual RaySoA trace(const Group& beamline, Sequential sequential, const int maxBatchSize, const int maxEvents,
24+
const std::vector<bool>& recordMask, const RayAttrFlag attr) = 0;
3225
};
3326

3427
} // namespace RAYX

Intern/rayx-core/src/Tracer/MegaKernelTracer.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct Resources {
104104
assert(recordMask.size() == static_cast<size_t>(numElements));
105105
allocBuf(q, d_recordMask, numElements);
106106
std::unique_ptr<bool[]> tmpHostMask(new bool[numElements]);
107-
for(int i = 0; i < numElements; ++i) {
107+
for (int i = 0; i < numElements; ++i) {
108108
tmpHostMask[i] = recordMask[i];
109109
}
110110
auto hostView = alpaka::createView(devHost, tmpHostMask.get(), numElements);
@@ -161,13 +161,8 @@ class MegaKernelTracer : public DeviceTracer {
161161
Resources<Acc> m_resources;
162162

163163
public:
164-
virtual RaySoA trace(
165-
const Group& beamline,
166-
Sequential sequential,
167-
const int maxBatchSize,
168-
const int maxEvents,
169-
const std::vector<bool>& recordMask,
170-
const RayAttrFlag attr) override {
164+
virtual RaySoA trace(const Group& beamline, Sequential sequential, const int maxBatchSize, const int maxEvents,
165+
const std::vector<bool>& recordMask, const RayAttrFlag attr) override {
171166
RAYX_PROFILE_FUNCTION_STDOUT();
172167

173168
const auto platformHost = alpaka::PlatformCpu{};

Intern/rayx-core/src/Tracer/Tracer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ Tracer::Tracer(const DeviceConfig& deviceConfig) {
5151
}
5252
}
5353

54-
RaySoA Tracer::trace(const Group& group, Sequential sequential, uint64_t maxBatchSize, uint32_t maxEvents, const std::vector<bool>& recordMask, const RayAttrFlag attr) {
54+
RaySoA Tracer::trace(const Group& group, Sequential sequential, uint64_t maxBatchSize, uint32_t maxEvents, const std::vector<bool>& recordMask,
55+
const RayAttrFlag attr) {
5556
// in sequential tracing, maxEvents should be equal to the number of elements
5657
if (sequential == Sequential::Yes) maxEvents = group.numElements();
5758

0 commit comments

Comments
 (0)