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

Fix 11 clang-tidy checks #293

Merged
merged 18 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 1 addition & 13 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ Checks: "*,
-readability-static-accessed-through-instance,
-misc-unused-parameters,
-hicpp-multiway-paths-covered,
-cert-err58-cpp,

google-readability-avoid-underscore-in-googletest-name,
google-upgrade-googletest-case,

-bugprone-implicit-widening-of-multiplication-result,
-bugprone-narrowing-conversions,
-cert-dcl59-cpp,
-cert-env33-c,
-cert-err33-c,
-cert-err34-c,
-cert-err58-cpp,
-cert-msc32-c,
-cert-msc51-cpp,
-clang-analyzer-core.CallAndMessage,
Expand Down Expand Up @@ -80,7 +79,6 @@ Checks: "*,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-cppcoreguidelines-virtual-class-destructor,
-google-build-namespaces,
-google-explicit-constructor,
-google-global-names-in-headers,
-google-readability-casting,
Expand All @@ -95,7 +93,6 @@ Checks: "*,
-hicpp-no-malloc,
-hicpp-signed-bitwise,
-hicpp-special-member-functions,
-hicpp-use-auto,
-hicpp-use-equals-default,
-hicpp-use-noexcept,
-hicpp-use-nullptr,
Expand All @@ -110,23 +107,15 @@ Checks: "*,
-misc-non-private-member-variables-in-classes,
-modernize-avoid-c-arrays,
-modernize-deprecated-headers,
-modernize-loop-convert,
-modernize-macro-to-enum,
-modernize-redundant-void-arg,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-equals-default,
-modernize-use-nodiscard,
-modernize-use-noexcept,
-modernize-use-nullptr,
-modernize-use-override,
-modernize-use-using,
-openmp-use-default-none,
-performance-faster-string-find,
-performance-for-range-copy,
-performance-inefficient-vector-operation,
-performance-unnecessary-value-param,
-readability-const-return-type,
-readability-convert-member-functions-to-static,
-readability-delete-null-pointer,
-readability-duplicate-include,
Expand All @@ -142,7 +131,6 @@ Checks: "*,
-readability-non-const-parameter,
-readability-redundant-control-flow,
-readability-redundant-preprocessor,
-readability-simplify-boolean-expr,
-readability-suspicious-call-argument"
WarningsAsErrors: ''
# More paths can be ignored by modifying this so that it looks like '^((?!/PATH/ONE/|/PATH/TWO/).)*$'
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ pipeline
sh '''
printf '=%.0s' {1..100}
printf "\n"
cat tidy_results_cpp.log
cat tidy_results_cpp_${CHOLLA_MAKE_TYPE}.log
printf '=%.0s' {1..100}
printf "\n"
cat tidy_results_gpu.log
cat tidy_results_gpu_${CHOLLA_MAKE_TYPE}.log
printf '=%.0s' {1..100}
printf "\n"
'''
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ tidy:
# - --warnings-as-errors=<string> Upgrade all warnings to error, good for CI
clang-tidy --verify-config
@echo -e
(time clang-tidy $(CLANG_TIDY_ARGS) $(CPPFILES_TIDY) -- $(DFLAGS) $(CXXFLAGS_CLANG_TIDY) $(LIBS_CLANG_TIDY)) > tidy_results_cpp.log 2>&1 & \
(time clang-tidy $(CLANG_TIDY_ARGS) $(GPUFILES_TIDY) -- $(DFLAGS) $(GPUFLAGS_CLANG_TIDY) $(LIBS_CLANG_TIDY)) > tidy_results_gpu.log 2>&1 & \
(time clang-tidy $(CLANG_TIDY_ARGS) $(CPPFILES_TIDY) -- $(DFLAGS) $(CXXFLAGS_CLANG_TIDY) $(LIBS_CLANG_TIDY)) > tidy_results_cpp_$(TYPE).log 2>&1 & \
(time clang-tidy $(CLANG_TIDY_ARGS) $(GPUFILES_TIDY) -- $(DFLAGS) $(GPUFLAGS_CLANG_TIDY) $(LIBS_CLANG_TIDY)) > tidy_results_gpu_$(TYPE).log 2>&1 & \
for i in 1 2; do wait -n; done
@echo -e "\nResults from clang-tidy are available in the 'tidy_results_cpp.log' and 'tidy_results_gpu.log' files."
@echo -e "\nResults from clang-tidy are available in the 'tidy_results_cpp_$(TYPE).log' and 'tidy_results_gpu_$(TYPE).log' files."

clean:
rm -f $(CLEAN_OBJS)
Expand Down
6 changes: 4 additions & 2 deletions src/global/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ char *trim(char *s)
return s;
}

// NOLINTNEXTLINE(cert-err58-cpp)
const std::set<const char *> optionalParams = {
"flag_delta", "ddelta_dt", "n_delta", "Lz", "Lx", "phi", "theta",
"delta", "nzr", "nxr", "H0", "Omega_M", "Omega_L", "Init_redshift",
Expand All @@ -107,8 +108,9 @@ const std::set<const char *> optionalParams = {
* "warnings" in output. */
int is_param_valid(const char *param_name)
{
for (auto it = optionalParams.begin(); it != optionalParams.end(); ++it) {
if (strcmp(param_name, *it) == 0) {
// for (auto optionalParam = optionalParams.begin(); optionalParam != optionalParams.end(); ++optionalParam) {
for (const auto *optionalParam : optionalParams) {
if (strcmp(param_name, optionalParam) == 0) {
return 1;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/gravity/gravity_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ Real Grav3D::Get_Average_Density()
Get_OMP_Grid_Indxs(nz_local, n_omp_procs, omp_id, &g_start, &g_end);
dens_sum_all[omp_id] = Get_Average_Density_function(g_start, g_end);
}
for (int i = 0; i < N_OMP_THREADS; i++) {
dens_sum += dens_sum_all[i];
for (Real dens_sum_all_element : dens_sum_all) {
dens_sum += dens_sum_all_element;
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/gravity/paris/PoissonZero3DBlockedGPU.cu
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ void PoissonZero3DBlockedGPU::solve(const long bytes, double *const density, dou
assert(density);
assert(potential);

double *const ua = potential;
double *const ub = density;
cufftDoubleComplex *const uc = reinterpret_cast<cufftDoubleComplex *>(ub);
double *const ua = potential;
double *const ub = density;
auto *const uc = reinterpret_cast<cufftDoubleComplex *>(ub);

const double ddi = ddi_;
const double ddj = ddj_;
Expand Down
2 changes: 1 addition & 1 deletion src/grid/boundary_conditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int Grid3D::Check_Custom_Boundary(int *flags, struct parameters P)
}

for (int i = 0; i < 6; i++) {
if (!((flags[i] >= 0) && (flags[i] <= 5))) {
if (flags[i] < 1 or flags[i] > 5) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know if these "or" and "not" statements are portable for other compilers?

Copy link
Collaborator Author

@bcaddy bcaddy Jun 21, 2023

Choose a reason for hiding this comment

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

They've been part of the C++ standard since C++98 so any standard compliant compiler will support them; see section 2.5 of the C++98 Standard.

MSVC is historically non-compliant with whatever standards they decide they don't like and so some versions from the mid 2010's and earlier don't support these alternative tokens directly but they can be enabled by either setting the right compiler flags or including the C compliance header.

chprintf(
"Invalid boundary conditions. Must select between 1 (periodic), 2 "
"(reflective), 3 (transmissive), 4 (custom), 5 (mpi).\n");
Expand Down
6 changes: 1 addition & 5 deletions src/grid/grid3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,7 @@ void Grid3D::Initialize(struct parameters *P)
#endif

#ifdef COSMOLOGY
if (P->scale_outputs_file[0] == '\0') {
H.OUTPUT_SCALE_FACOR = false;
} else {
H.OUTPUT_SCALE_FACOR = true;
}
H.OUTPUT_SCALE_FACOR = not P->scale_outputs_file[0] == '\0';
#endif

H.Output_Initial = true;
Expand Down
63 changes: 31 additions & 32 deletions src/io/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,33 +312,32 @@ void OutputFloat32(Grid3D &G, struct parameters P, int nfile)
// first time it is needed It persists until program exit, and then calls
// Free upon destruction
cuda_utilities::DeviceVector<float> static device_dataset_vector{buffer_size};
float *device_dataset_buffer = device_dataset_vector.data();
float *dataset_buffer = (float *)malloc(buffer_size * sizeof(float));
auto *dataset_buffer = (float *)malloc(buffer_size * sizeof(float));

if (P.out_float32_density > 0) {
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer, device_dataset_buffer,
G.C.d_density, "/density");
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer,
device_dataset_vector.data(), G.C.d_density, "/density");
}
if (P.out_float32_momentum_x > 0) {
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer, device_dataset_buffer,
G.C.d_momentum_x, "/momentum_x");
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer,
device_dataset_vector.data(), G.C.d_momentum_x, "/momentum_x");
}
if (P.out_float32_momentum_y > 0) {
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer, device_dataset_buffer,
G.C.d_momentum_y, "/momentum_y");
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer,
device_dataset_vector.data(), G.C.d_momentum_y, "/momentum_y");
}
if (P.out_float32_momentum_z > 0) {
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer, device_dataset_buffer,
G.C.d_momentum_z, "/momentum_z");
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer,
device_dataset_vector.data(), G.C.d_momentum_z, "/momentum_z");
}
if (P.out_float32_Energy > 0) {
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer, device_dataset_buffer,
G.C.d_Energy, "/Energy");
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer,
device_dataset_vector.data(), G.C.d_Energy, "/Energy");
}
#ifdef DE
if (P.out_float32_GasEnergy > 0) {
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer, device_dataset_buffer,
G.C.d_GasEnergy, "/GasEnergy");
WriteHDF5Field3D(H.nx, H.ny, nx_dset, ny_dset, nz_dset, H.n_ghost, file_id, dataset_buffer,
device_dataset_vector.data(), G.C.d_GasEnergy, "/GasEnergy");
}
#endif // DE
#ifdef MHD
Expand All @@ -347,17 +346,17 @@ void OutputFloat32(Grid3D &G, struct parameters P, int nfile)
if (P.out_float32_magnetic_x > 0) {
chprintf("WARNING: MHD float-32 output has a different output format than float-64\n");
WriteHDF5Field3D(H.nx, H.ny, nx_dset + 1, ny_dset + 1, nz_dset + 1, H.n_ghost - 1, file_id, dataset_buffer,
device_dataset_buffer, G.C.d_magnetic_x, "/magnetic_x");
device_dataset_vector.data(), G.C.d_magnetic_x, "/magnetic_x");
}
if (P.out_float32_magnetic_y > 0) {
chprintf("WARNING: MHD float-32 output has a different output format than float-64\n");
WriteHDF5Field3D(H.nx, H.ny, nx_dset + 1, ny_dset + 1, nz_dset + 1, H.n_ghost - 1, file_id, dataset_buffer,
device_dataset_buffer, G.C.d_magnetic_y, "/magnetic_y");
device_dataset_vector.data(), G.C.d_magnetic_y, "/magnetic_y");
}
if (P.out_float32_magnetic_z > 0) {
chprintf("WARNING: MHD float-32 output has a different output format than float-64\n");
WriteHDF5Field3D(H.nx, H.ny, nx_dset + 1, ny_dset + 1, nz_dset + 1, H.n_ghost - 1, file_id, dataset_buffer,
device_dataset_buffer, G.C.d_magnetic_z, "/magnetic_z");
device_dataset_vector.data(), G.C.d_magnetic_z, "/magnetic_z");
}

#endif // MHD
Expand Down Expand Up @@ -1411,32 +1410,32 @@ void Grid3D::Write_Grid_HDF5(hid_t file_id)
size_t buffer_size = nx_dset * ny_dset * nz_dset;
#endif
cuda_utilities::DeviceVector<Real> static device_dataset_vector{buffer_size};
Real *device_dataset_buffer = device_dataset_vector.data();
dataset_buffer = (Real *)malloc(buffer_size * sizeof(Real));
dataset_buffer = (Real *)malloc(buffer_size * sizeof(Real));

// Start writing fields

Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_density, "/density");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_density, "/density");
if (output_momentum || H.Output_Complete_Data) {
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_momentum_x, "/momentum_x");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_momentum_y, "/momentum_y");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_momentum_z, "/momentum_z");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_momentum_x, "/momentum_x");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_momentum_y, "/momentum_y");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_momentum_z, "/momentum_z");
}
if (output_energy || H.Output_Complete_Data) {
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_Energy, "/Energy");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_Energy, "/Energy");
#ifdef DE
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_GasEnergy, "/GasEnergy");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_GasEnergy, "/GasEnergy");
#endif
}

#ifdef SCALAR

#ifdef BASIC_SCALAR
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_basic_scalar, "/scalar0");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_basic_scalar, "/scalar0");
#endif // BASIC_SCALAR

#ifdef DUST
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_buffer, C.d_dust_density, "/dust_density");
Write_Grid_HDF5_Field_GPU(H, file_id, dataset_buffer, device_dataset_vector.data(), C.d_dust_density,
"/dust_density");
#endif // DUST

#ifdef OUTPUT_CHEMISTRY
Expand Down Expand Up @@ -1486,18 +1485,18 @@ void Grid3D::Write_Grid_HDF5(hid_t file_id)
#if defined(GRAVITY) && defined(OUTPUT_POTENTIAL)
Write_Generic_HDF5_Field_GPU(Grav.nx_local + 2 * N_GHOST_POTENTIAL, Grav.ny_local + 2 * N_GHOST_POTENTIAL,
Grav.nz_local + 2 * N_GHOST_POTENTIAL, Grav.nx_local, Grav.ny_local, Grav.nz_local,
N_GHOST_POTENTIAL, file_id, dataset_buffer, device_dataset_buffer, Grav.F.potential_d,
"/grav_potential");
N_GHOST_POTENTIAL, file_id, dataset_buffer, device_dataset_vector.data(),
Grav.F.potential_d, "/grav_potential");
#endif // GRAVITY and OUTPUT_POTENTIAL

#ifdef MHD
if (H.Output_Complete_Data) {
WriteHDF5Field3D(H.nx, H.ny, H.nx_real + 1, H.ny_real, H.nz_real, H.n_ghost, file_id, dataset_buffer,
device_dataset_buffer, C.d_magnetic_x, "/magnetic_x", 0);
device_dataset_vector.data(), C.d_magnetic_x, "/magnetic_x", 0);
WriteHDF5Field3D(H.nx, H.ny, H.nx_real, H.ny_real + 1, H.nz_real, H.n_ghost, file_id, dataset_buffer,
device_dataset_buffer, C.d_magnetic_y, "/magnetic_y", 1);
device_dataset_vector.data(), C.d_magnetic_y, "/magnetic_y", 1);
WriteHDF5Field3D(H.nx, H.ny, H.nx_real, H.ny_real, H.nz_real + 1, H.n_ghost, file_id, dataset_buffer,
device_dataset_buffer, C.d_magnetic_z, "/magnetic_z", 2);
device_dataset_vector.data(), C.d_magnetic_z, "/magnetic_z", 2);
}
#endif // MHD
}
Expand Down
13 changes: 2 additions & 11 deletions src/main_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,8 @@ int main(int argc, char **argv)
globalMpiLauncher.init("mpirun -np");
}

if (input.cmdOptionExists("--runCholla=false")) {
globalRunCholla = false;
} else {
globalRunCholla = true;
}

if (input.cmdOptionExists("--compareSystemTestResults=false")) {
globalCompareSystemTestResults = false;
} else {
globalCompareSystemTestResults = true;
}
globalRunCholla = not input.cmdOptionExists("--runCholla=false");
globalCompareSystemTestResults = not input.cmdOptionExists("--compareSystemTestResults=false");

// Run test and return result
return RUN_ALL_TESTS();
Expand Down
7 changes: 2 additions & 5 deletions src/mhd/ct_electric_fields_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ class tMHDCalculateCTElectricFields : public ::testing::Test
*
*/
tMHDCalculateCTElectricFields()
: nx(2),
ny(nx),
nz(nx),
n_cells(nx * ny * nz),
: n_cells(nx * ny * nz),
fluxX(n_cells * (grid_enum::num_flux_fields)),
fluxY(n_cells * (grid_enum::num_flux_fields)),
fluxZ(n_cells * (grid_enum::num_flux_fields)),
Expand Down Expand Up @@ -71,7 +68,7 @@ class tMHDCalculateCTElectricFields : public ::testing::Test

protected:
// Initialize the test grid and other state variables
size_t const nx, ny, nz;
size_t const nx = 2, ny = nx, nz = nx;
size_t const n_cells;

// Launch Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/mhd/magnetic_divergence_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ TEST(tMHDGrid3DcheckMagneticDivergence, CorrectInputExpectCorrectOutput)
std::vector<Real> host_grid(G.H.n_cells * G.H.n_fields);
std::mt19937 prng(1);
std::uniform_real_distribution<double> doubleRand(1, 5);
for (size_t i = 0; i < host_grid.size(); i++) {
host_grid.at(i) = doubleRand(prng) / 1E15;
for (double& host_data : host_grid) {
host_data = doubleRand(prng) / 1E15;
}

// Allocating and copying to device
Expand Down
13 changes: 3 additions & 10 deletions src/mhd/magnetic_update_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ class tMHDUpdateMagneticField3D : public ::testing::Test
*
*/
tMHDUpdateMagneticField3D()
: nx(3),
ny(nx),
nz(nx),
n_cells(nx * ny * nz),
dt(3.2),
dx(2.5),
dy(2.5),
dz(2.5),
: n_cells(nx * ny * nz),
sourceGrid(n_cells * (grid_enum::num_fields)),
destinationGrid(n_cells * (grid_enum::num_fields), -999.),
ctElectricFields(n_cells * 3),
Expand All @@ -64,9 +57,9 @@ class tMHDUpdateMagneticField3D : public ::testing::Test

protected:
// Initialize the test grid and other state variables
size_t const nx, ny, nz;
size_t const nx = 3, ny = nx, nz = nx;
size_t const n_cells;
Real const dt, dx, dy, dz;
Real const dt = 3.2, dx = 2.5, dy = dx, dz = dx;

// Launch Parameters
dim3 const dimGrid; // How many blocks in the grid
Expand Down
4 changes: 2 additions & 2 deletions src/particles/feedback_CIC_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ int snr_n;
#ifndef O_HIP
__device__ double atomicMax(double* address, double val)
{
unsigned long long int* address_as_ull = (unsigned long long int*)address;
unsigned long long int old = *address_as_ull, assumed;
auto* address_as_ull = (unsigned long long int*)address;
unsigned long long int old = *address_as_ull, assumed;
do {
assumed = old;
old = atomicCAS(address_as_ull, assumed, __double_as_longlong(fmax(val, __longlong_as_double(assumed))));
Expand Down
2 changes: 1 addition & 1 deletion src/particles/particles_3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void Particles_3D::Initialize_Sphere(struct parameters *P)
Real *temp_mass = (Real *)malloc(particles_array_size * sizeof(Real));
#endif
#ifdef PARTICLE_IDS
part_int_t *temp_id = (part_int_t *)malloc(particles_array_size * sizeof(part_int_t));
auto *temp_id = (part_int_t *)malloc(particles_array_size * sizeof(part_int_t));
#endif

chprintf(" Allocated GPU memory for particle data\n");
Expand Down
Loading