Skip to content

Commit

Permalink
[bug] apply patch in #235 to pmcx, bump pmcx to v0.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Nov 21, 2024
1 parent 744c088 commit d033755
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pmcx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- Copyright: (C) Matin Raayai Ardakani (2022-2023) <raayaiardakani.m at northeastern.edu>, Qianqian Fang (2019-2024) <q.fang at neu.edu>, Fan-Yu Yen (2023-2024) <yen.f at northeastern.edu>
- License: GNU Public License V3 or later
- Version: 0.3.5
- Version: 0.3.6
- URL: https://pypi.org/project/pmcx/
- Github: https://github.com/fangq/mcx

Expand Down
2 changes: 1 addition & 1 deletion pmcx/pmcx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# from .files import loadmc2, loadmch, load, save
from .bench import bench

__version__ = "0.3.5"
__version__ = "0.3.6"

__all__ = (
"gpuinfo",
Expand Down
2 changes: 1 addition & 1 deletion pmcx/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def build_extension(self, ext):
setup(
name="pmcx",
packages=["pmcx"],
version="0.3.5",
version="0.3.6",
requires=["numpy"],
license="GPLv3+",
author="Matin Raayai Ardakani, Qianqian Fang, Fan-Yu Yen",
Expand Down
8 changes: 4 additions & 4 deletions src/pmcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void parseVolume(const py::dict& user_cfg, Config& mcx_config) {
free(mcx_config.vol);
}

unsigned int dim_xyz = 0;
size_t dim_xyz = 0;

// Data type-specific logic
if (py::array_t<int8_t>::check_(volume_handle)) {
Expand Down Expand Up @@ -1091,9 +1091,9 @@ py::dict pmcx_interface(const py::dict& user_cfg) {

/** Initialize all buffers necessary to store the output variables */
if (mcx_config.issave2pt == 1) {
int field_len =
size_t field_len =
static_cast<int>(mcx_config.dim.x) * static_cast<int>(mcx_config.dim.y) * static_cast<int>(mcx_config.dim.z) *
(int) ((mcx_config.tend - mcx_config.tstart) / mcx_config.tstep + 0.5) * mcx_config.srcnum;
(size_t) ((mcx_config.tend - mcx_config.tstart) / mcx_config.tstep + 0.5) * mcx_config.srcnum;

if (mcx_config.replay.seed != nullptr && mcx_config.replaydet == -1) {
field_len *= mcx_config.detnum;
Expand Down Expand Up @@ -1218,7 +1218,7 @@ py::dict pmcx_interface(const py::dict& user_cfg) {
}

if (mcx_config.issave2pt) {
int field_len;
size_t field_len;
field_dim[0] = mcx_config.srcnum * mcx_config.dim.x;
field_dim[1] = mcx_config.dim.y;
field_dim[2] = mcx_config.dim.z;
Expand Down

0 comments on commit d033755

Please sign in to comment.