-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from ANL-CESAR/hip
Add HIP version
- Loading branch information
Showing
28 changed files
with
1,787 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#=============================================================================== | ||
# User Options | ||
#=============================================================================== | ||
|
||
COMPILER = amd | ||
OPTIMIZE = yes | ||
DEBUG = no | ||
PROFILE = no | ||
|
||
#=============================================================================== | ||
# Program name & source code list | ||
#=============================================================================== | ||
|
||
program = rsbench | ||
|
||
source = \ | ||
main.hip \ | ||
simulation.hip\ | ||
io.hip \ | ||
init.hip \ | ||
material.hip \ | ||
utils.hip | ||
|
||
obj = $(source:.hip=.o) | ||
|
||
#=============================================================================== | ||
# Sets Flags | ||
#=============================================================================== | ||
|
||
# Standard Flags | ||
CFLAGS := | ||
|
||
# AMD | ||
ifeq ($(COMPILER),amd) | ||
CC = hipcc | ||
CFLAGS += -std=c++14 | ||
endif | ||
|
||
# Linker Flags | ||
LDFLAGS = -lm | ||
|
||
# Debug Flags | ||
ifeq ($(DEBUG),yes) | ||
CFLAGS += -g -G | ||
LDFLAGS += -g -G | ||
endif | ||
|
||
# Profiling Flags | ||
ifeq ($(PROFILE),yes) | ||
CFLAGS += -pg | ||
LDFLAGS += -pg | ||
endif | ||
|
||
# Optimization Flags | ||
ifeq ($(OPTIMIZE),yes) | ||
CFLAGS += -O3 | ||
endif | ||
|
||
#=============================================================================== | ||
# Targets to Build | ||
#=============================================================================== | ||
|
||
$(program): $(obj) rsbench.h Makefile | ||
$(CC) $(CFLAGS) $(obj) -o $@ $(LDFLAGS) | ||
|
||
%.o: %.hip rsbench.h Makefile | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
clean: | ||
rm -rf rsbench $(obj) | ||
|
||
edit: | ||
vim -p $(source) rsbench.h | ||
|
||
run: | ||
./rsbench |
Oops, something went wrong.