Skip to content
Snippets Groups Projects
Commit 0601e626 authored by Cristian C Lalescu's avatar Cristian C Lalescu
Browse files

use `char*` instead of `const char*`

no idea why the intel compiler hates const char so much...
parent 991b6dfb
No related branches found
No related tags found
No related merge requests found
...@@ -98,9 +98,9 @@ RMHD_converter::~RMHD_converter() ...@@ -98,9 +98,9 @@ RMHD_converter::~RMHD_converter()
} }
int RMHD_converter::convert( int RMHD_converter::convert(
const char *ifile0, char *ifile0,
const char *ifile1, char *ifile1,
const char *ofile) char *ofile)
{ {
//read first field //read first field
this->f0c->read(ifile0, (void*)this->c0); this->f0c->read(ifile0, (void*)this->c0);
......
...@@ -41,9 +41,9 @@ class RMHD_converter ...@@ -41,9 +41,9 @@ class RMHD_converter
~RMHD_converter(); ~RMHD_converter();
int convert( int convert(
const char *ifile0, char *ifile0,
const char *ifile1, char *ifile1,
const char *ofile); char *ofile);
}; };
#endif//RMHD_CONVERTER #endif//RMHD_CONVERTER
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
#include <iostream> #include <iostream>
#include "field_descriptor.hpp" #include "field_descriptor.hpp"
extern int myrank, nprocs;
field_descriptor::field_descriptor( field_descriptor::field_descriptor(
int ndims, int ndims,
int *n, int *n,
...@@ -79,7 +77,7 @@ field_descriptor::~field_descriptor() ...@@ -79,7 +77,7 @@ field_descriptor::~field_descriptor()
} }
int field_descriptor::read( int field_descriptor::read(
const char *fname, char *fname,
void *buffer) void *buffer)
{ {
MPI_Info info; MPI_Info info;
...@@ -111,7 +109,7 @@ int field_descriptor::read( ...@@ -111,7 +109,7 @@ int field_descriptor::read(
} }
int field_descriptor::write( int field_descriptor::write(
const char *fname, char *fname,
void *buffer) void *buffer)
{ {
MPI_Info info; MPI_Info info;
...@@ -268,7 +266,7 @@ field_descriptor* field_descriptor::get_transpose() ...@@ -268,7 +266,7 @@ field_descriptor* field_descriptor::get_transpose()
return new field_descriptor(this->ndims, n, this->mpi_dtype, this->comm); return new field_descriptor(this->ndims, n, this->mpi_dtype, this->comm);
} }
void proc_print_err_message(const char *message) void proc_print_err_message(char *message)
{ {
for (int i = 0; i < nprocs; i++) for (int i = 0; i < nprocs; i++)
{ {
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#define FIELD_DESCRIPTOR #define FIELD_DESCRIPTOR
extern int myrank, nprocs;
class field_descriptor class field_descriptor
{ {
public: public:
...@@ -33,10 +35,10 @@ class field_descriptor ...@@ -33,10 +35,10 @@ class field_descriptor
* own mpi_array_dtype that was defined in the constructor. * own mpi_array_dtype that was defined in the constructor.
* */ * */
int read( int read(
const char *fname, char *fname,
void *buffer); void *buffer);
int write( int write(
const char *fname, char *fname,
void *buffer); void *buffer);
/* a function that generates the transposed descriptor. /* a function that generates the transposed descriptor.
...@@ -80,7 +82,7 @@ int fftwf_clip_zero_padding( ...@@ -80,7 +82,7 @@ int fftwf_clip_zero_padding(
field_descriptor *f, field_descriptor *f,
float *a); float *a);
void proc_print_err_message(const char *message); void proc_print_err_message(char *message);
#endif//FIELD_DESCRIPTOR #endif//FIELD_DESCRIPTOR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment