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
LFLAGS= -Wl,--unresolved-symbols=ignore-in-shared-libs | |
CC := gcc | |
C_FILES := $(wildcard *.c) | |
OBJ_FILES := $(notdir $(C_FILES:.c=.o)) | |
all: simple_dispatch |
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
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp | |
index cf493e5..ea88055 100644 | |
--- a/lib/Sema/SemaDecl.cpp | |
+++ b/lib/Sema/SemaDecl.cpp | |
@@ -8375,6 +8375,67 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, | |
assert(R.getTypePtr()->isFunctionType()); | |
+ // HCC generic address space hack | |
+ bool genericHack = false; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#include <limits.h> | |
#include <stdint.h> | |
typedef uint16_t src_t; | |
typedef uint16_t src_rep_t; | |
#define SRC_REP_C UINT16_C | |
static const int srcSigBits = 10; | |
#define src_rep_t_clz __builtin_clz | |
typedef float dst_t; |
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
iff --git a/benchmarks/bfs/src/hip/kernel.cc b/benchmarks/bfs/src/hip/kernel.cc | |
index 985436d..89f8c2e 100644 | |
--- a/benchmarks/bfs/src/hip/kernel.cc | |
+++ b/benchmarks/bfs/src/hip/kernel.cc | |
@@ -225,16 +225,17 @@ BFS_in_GPU_kernel(grid_launch_parm lp, | |
int tid = hipBlockIdx_x*MAX_THREADS_PER_BLOCK + hipThreadIdx_x; | |
if( tid<no_of_nodes) | |
{ | |
- int pid; | |
- if(tot_sum == 0)//this is the first BFS level of current kernel call |
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
// export PATH=${PATH}:/opr/rocm/bin | |
// hcc `clamp-config --cxxflags` -g -O3 -o obj/main.o -c main.cpp | |
// hcc -o vector_add obj/main.o `clamp-config --ldflags` | |
#include <iostream> | |
#include <algorithm> | |
#include <numeric> | |
#include <array> | |
#include <amp.h> |
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
// build it: hcc `hcc-config --cxxflags --ldflags` -lhc_am test.cpp -lm | |
#include "hc.hpp" | |
#include "hc_math.hpp" | |
#include "hc_am.hpp" | |
#include <iostream> | |
#include <iomanip> | |
#define VECTOR_SIZE 1024 * 1024 |
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
// XFAIL: Linux | |
// RUN: %hc %s -lhc_am -o %t.out && %t.out | |
#include <hc.hpp> | |
#include <grid_launch.h> | |
#include <hc_am.hpp> | |
#include <iostream> | |
#include <random> |
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
// XFAIL: Linux | |
// RUN: %hc %s -o %t.out && %t.out | |
#include <hc.hpp> | |
#include <iostream> | |
#include <random> | |
#include <time.h> |
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
// build with: | |
// hcc `hcc-config --cxxflags --ldflags` hc_array_add_dgpu.cpp | |
#include <iostream> | |
#include <random> | |
#include <hc.hpp> | |
int main () | |
{ | |
// define inputs and output |
NewerOlder