Skip to content

Commit

Permalink
make code compile on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed May 22, 2022
1 parent e87bb49 commit 149b1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mcx_core.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2489,7 +2489,7 @@ void mcx_run_simulation(Config* cfg, GPUInfo* gpu) {

#ifdef _WIN32
/** \c updateprogress - CUDA event needed to avoid hanging on Windows, see https://forums.developer.nvidia.com/t/solved-how-to-update-host-memory-variable-from-device-during-opencl-kernel-execution/59409/5 */
cudaEvent_t updateprogress;
cudaEvent_t updateprogress = NULL;
#endif

/** all pointers start with g___ are the corresponding GPU buffers to read/write host variables defined above */
Expand Down
5 changes: 3 additions & 2 deletions src/mcx_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@
#define MCX_CUDA_ERROR_LAUNCH_FAILED 719 /**< CUDA kernel launch error code */

#ifndef MCX_CUDA_ARCH
#define MCX_CUDA_ARCH 100 /**< fallback CUDA version */
#define MCX_CUDA_ARCH 100 /**< fallback CUDA version */
#endif

#define MCX_ERROR(id,msg) mcx_error(id,msg,__FILE__,__LINE__) /**< macro for error handling */
#define MIN(a,b) ((a)<(b)?(a):(b)) /**< macro to get the min values of two numbers */
#define MAX(a,b) ((a)>(b)?(a):(b)) /**< macro to get the max values of two numbers */

typedef unsigned int uint; /**< use uint for unsigned int */
typedef unsigned int uint; /**< use uint for unsigned int */
typedef unsigned short ushort; /**< use ushort for unsigned short */

enum TOutputType {otFlux, otFluence, otEnergy, otJacobian, otWP, otDCS, otRF}; /**< types of output */
enum TMCXParent {mpStandalone, mpMATLAB, mpPython}; /**< whether MCX is run in binary or mex mode */
Expand Down

0 comments on commit 149b1ef

Please sign in to comment.