mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Use std::complex<double> (C++11 guarantees layout compatibility)
This commit is contained in:
parent
1a9f2a27d7
commit
2c498d3024
2 changed files with 4 additions and 4 deletions
|
|
@ -425,7 +425,7 @@ read_string(hid_t obj_id, const char* name, size_t slen, char* buffer, bool inde
|
|||
|
||||
|
||||
void
|
||||
read_complex(hid_t obj_id, const char* name, double _Complex* buffer, bool indep)
|
||||
read_complex(hid_t obj_id, const char* name, std::complex<double>* buffer, bool indep)
|
||||
{
|
||||
// Create compound datatype for complex numbers
|
||||
struct complex_t {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
#include "hdf5_hl.h"
|
||||
|
||||
#include <array>
|
||||
#include <complex>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <complex.h>
|
||||
|
||||
#include "position.h"
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ namespace openmc {
|
|||
//==============================================================================
|
||||
|
||||
void read_attr(hid_t obj_id, const char* name, hid_t mem_type_id,
|
||||
const void* buffer);
|
||||
void* buffer);
|
||||
void write_attr(hid_t obj_id, int ndim, const hsize_t* dims, const char* name,
|
||||
hid_t mem_type_id, const void* buffer);
|
||||
void read_dataset(hid_t obj_id, const char* name, hid_t mem_type_id,
|
||||
|
|
@ -101,7 +101,7 @@ extern "C" {
|
|||
void read_attr_string(hid_t obj_id, const char* name, size_t slen,
|
||||
char* buffer);
|
||||
void read_complex(hid_t obj_id, const char* name,
|
||||
double _Complex* buffer, bool indep);
|
||||
std::complex<double>* buffer, bool indep);
|
||||
void read_double(hid_t obj_id, const char* name, double* buffer,
|
||||
bool indep);
|
||||
void read_int(hid_t obj_id, const char* name, int* buffer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue