Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,19 @@ LIB_PATH_SFX =
# override: TARGET_ARCH - set the target architecture
# override: defaults to -m64 for 64-bit machines
# override: -m32 for 32-bit machines
ifeq ($(findstring 64,$(arch)), 64)
ifeq ($(arch), x86_64)
TARGET_ARCH ?= -m64
# on Linux, toolkit libraries are under /lib64 for 64-bit
else ifeq ($(findstring 86,$(arch)), 86) # matches i386 and i686
TARGET_ARCH ?= -m32
else # other architectures such as aarch64 and ppc64
TARGET_ARCH ?=
endif

# on Linux, toolkit libraries are under /lib64 for 64-bit
ifeq ($(findstring 64,$(arch)), 64)
ifeq ($(platform), Linux)
LIB_PATH_SFX = 64
endif
else # i386 or i686
TARGET_ARCH ?= -m32
endif

# override: INCPATH - paths for include files
Expand Down
6 changes: 3 additions & 3 deletions src/cuda/forces.cu
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ setconstants(const SimParams *simparams, const PhysParams *physparams,

// Neibs cell to offset table
char3 cell_to_offset[27];
for(char z=-1; z<=1; z++) {
for(char y=-1; y<=1; y++) {
for(char x=-1; x<=1; x++) {
for(signed char z=-1; z<=1; z++) {
for(signed char y=-1; y<=1; y++) {
for(signed char x=-1; x<=1; x++) {
int i = (x + 1) + (y + 1)*3 + (z + 1)*9;
cell_to_offset[i] = make_char3(x, y, z);
}
Expand Down