Skip to content

Commit

Permalink
[cpp] Fix Windows OMP build
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Sep 23, 2024
1 parent 430a8e3 commit a4d0a7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cpp/pffdtd/engine_2d_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ auto Engine2DCPU::operator()(Simulation2D const& sim) const -> stdex::mdarray<do
auto const Nx = sim.Nx;
auto const Ny = sim.Ny;
auto const Nt = sim.Nt;
auto const Nb = sim.adj_bn.size();
auto const Nb = static_cast<int64_t>(sim.adj_bn.size());
auto const inx = sim.inx;
auto const iny = sim.iny;
auto const Nr = sim.out_ixy.size();
auto const Nr = static_cast<int64_t>(sim.out_ixy.size());
auto const lossFactor = sim.loss_factor;

summary(sim);
Expand Down Expand Up @@ -75,7 +75,7 @@ auto Engine2DCPU::operator()(Simulation2D const& sim) const -> stdex::mdarray<do
auto const elapsedBoundarySample = timeit([&] {
// Boundary Rigid
#pragma omp parallel for
for (size_t i = 0; i < Nb; ++i) {
for (int64_t i = 0; i < Nb; ++i) {
auto const ib = sim.bn_ixy[i];
auto const K = sim.adj_bn[i];

Expand All @@ -93,7 +93,7 @@ auto Engine2DCPU::operator()(Simulation2D const& sim) const -> stdex::mdarray<do

// Boundary Loss
#pragma omp parallel for
for (size_t i = 0; i < Nb; ++i) {
for (int64_t i = 0; i < Nb; ++i) {
auto const ib = sim.bn_ixy[i];
auto const K = sim.adj_bn[i];
auto const K4 = 4 - K;
Expand All @@ -110,7 +110,7 @@ auto Engine2DCPU::operator()(Simulation2D const& sim) const -> stdex::mdarray<do
u0(inx, iny) += sim.src_sig[n];

// Copy Output
for (size_t i = 0; i < Nr; ++i) {
for (int64_t i = 0; i < Nr; ++i) {
auto r_ixy = sim.out_ixy[i];
out(i, n) = u0.data_handle()[r_ixy];
}
Expand Down

0 comments on commit a4d0a7f

Please sign in to comment.