-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
track_order
option to celer-g4 and default to partitioning by c…
…harge on GPU (#1433) * Add track order option to celer-g4 * Default to partitioning tracks by charge on the GPU
- Loading branch information
1 parent
bec9f4c
commit 7e52dc4
Showing
7 changed files
with
77 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//----------------------------------*-C++-*----------------------------------// | ||
// Copyright 2024 UT-Battelle, LLC, and other Celeritas developers. | ||
// See the top-level COPYRIGHT file for details. | ||
// SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
//---------------------------------------------------------------------------// | ||
//! \file celeritas/TypesIO.hh | ||
//---------------------------------------------------------------------------// | ||
#pragma once | ||
|
||
#include <nlohmann/json.hpp> | ||
|
||
#include "corecel/io/JsonUtils.json.hh" | ||
|
||
#include "Types.hh" | ||
|
||
namespace celeritas | ||
{ | ||
//---------------------------------------------------------------------------// | ||
/*! | ||
* Read options from JSON. | ||
*/ | ||
void from_json(nlohmann::json const& j, TrackOrder& value) | ||
{ | ||
static auto const from_string | ||
= StringEnumMapper<TrackOrder>::from_cstring_func(to_cstring, | ||
"track order"); | ||
value = from_string(j.get<std::string>()); | ||
} | ||
|
||
//---------------------------------------------------------------------------// | ||
/*! | ||
* Write options to JSON. | ||
*/ | ||
void to_json(nlohmann::json& j, TrackOrder const& value) | ||
{ | ||
j = std::string{to_cstring(value)}; | ||
} | ||
|
||
//---------------------------------------------------------------------------// | ||
} // namespace celeritas |