Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for different data types in arrays, also on GPU #324

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CarpetX: add missing debug output for COMPLEX
  • Loading branch information
rhaas80 committed Jan 1, 2025
commit 24adbe11b5f124196b0aa46c6f15ee40a6989db6
9 changes: 9 additions & 0 deletions CarpetX/src/driver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2310,12 +2310,21 @@ YAML::Emitter &operator<<(YAML::Emitter &yaml,
return yaml;
}

YAML::Emitter &operator<<(YAML::Emitter &yaml, const CCTK_COMPLEX &cval) {
yaml << YAML::Flow << YAML::BeginSeq << cval.real() << cval.imag()
<< YAML::EndSeq;
return yaml;
};

YAML::Emitter &
operator<<(YAML::Emitter &yaml,
const GHExt::GlobalData::AnyTypeVector &anytypevector) {
yaml << YAML::BeginSeq;
for (size_t i = 0; i < anytypevector.size(); ++i) {
switch (anytypevector.type()) {
case CCTK_VARIABLE_COMPLEX:
yaml << *(CCTK_COMPLEX *)anytypevector.data_at(i);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be (const CCTK_COMPLEX *).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8f8fbad

break;
case CCTK_VARIABLE_REAL:
yaml << *(CCTK_REAL *)anytypevector.data_at(i);
break;
Expand Down