Skip to content

Commit

Permalink
[bug] angleinvcdf and invcdf are not read in full in pmcx, fix #233
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 25, 2024
1 parent 7b8ecb6 commit 58dec12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pmcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) {
}

auto buffer_info = f_style_volume.request();
unsigned int nphase = buffer_info.shape.size();
unsigned int nphase = buffer_info.size;
float* val = static_cast<float*>(buffer_info.ptr);
mcx_config.nphase = nphase + 2;
mcx_config.invcdf = (float*) calloc(mcx_config.nphase, sizeof(float));
Expand All @@ -872,7 +872,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) {
}

auto buffer_info = f_style_volume.request();
unsigned int nangle = buffer_info.shape.size();
unsigned int nangle = buffer_info.size;
float* val = static_cast<float*>(buffer_info.ptr);
mcx_config.nangle = nangle;
mcx_config.angleinvcdf = (float*) calloc(mcx_config.nangle, sizeof(float));
Expand Down

0 comments on commit 58dec12

Please sign in to comment.