"int64_t" is defined in stdint.h; must use "long" in OpenCL kernels instead

This commit is contained in:
Axel Kohlmeyer
2021-08-26 22:46:08 -04:00
parent 42a3a7d10f
commit bbb3f35aa3
5 changed files with 18 additions and 6 deletions

View File

@ -20,9 +20,13 @@
#define tagint int
#endif
#ifdef LAMMPS_BIGBIG
#include "inttypes.h"
#ifdef USE_OPENCL
#define tagint long
#else
#include "stdint.h"
#define tagint int64_t
#endif
#endif
#ifdef LAMMPS_SMALLSMALL
#define tagint int
#endif
@ -39,9 +43,13 @@ _texture( q_tex,int2);
#define tagint int
#endif
#ifdef LAMMPS_BIGBIG
#include "inttypes.h"
#ifdef USE_OPENCL
#define tagint long
#else
#include "stdint.h"
#define tagint int64_t
#endif
#endif
#ifdef LAMMPS_SMALLSMALL
#define tagint int
#endif

View File

@ -21,9 +21,13 @@
#define tagint int
#endif
#ifdef LAMMPS_BIGBIG
#include "inttypes.h"
#ifdef USE_OPENCL
#define tagint long
#else
#include "stdint.h"
#define tagint int64_t
#endif
#endif
#ifdef LAMMPS_SMALLSMALL
#define tagint int
#endif

View File

@ -136,7 +136,7 @@ typedef int tagint;
#define OCL_INT_TYPE "-DLAMMPS_SMALLBIG"
#endif
#ifdef LAMMPS_BIGBIG
#include "inttypes.h"
#include "stdint.h"
typedef int64_t tagint;
#define OCL_INT_TYPE "-DLAMMPS_BIGBIG"
#endif

View File

@ -2712,7 +2712,7 @@ Below is a brief C code demonstrating accessing this collected bond information.
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdint.h>
#include "library.h"
int main(int argc, char **argv)

View File

@ -35,7 +35,7 @@
#endif
#if defined(LAMMPS_BIGBIG) || defined(LAMMPS_SMALLBIG)
#include <inttypes.h> /* for int64_t */
#include <stdint.h> /* for int64_t */
#endif
/** Data type constants for extracting data from atoms, computes and fixes