Skip to content

Commit 634ab74

Browse files
authored
Merge pull request #55 from JustCallMeRay/main
Changes file extension of public facing files from .h to .hpp
2 parents ff70a9b + bfea715 commit 634ab74

38 files changed

Lines changed: 71 additions & 70 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ message(
4242
"Include directories for wgpu: ${CMAKE_CURRENT_SOURCE_DIR}/third_party/headers"
4343
)
4444

45-
add_library(gpud SHARED gpu.h)
45+
add_library(gpud SHARED gpu.hpp)
4646
set_target_properties(gpud PROPERTIES LINKER_LANGUAGE CXX)
4747
target_link_libraries(gpud PRIVATE wgpu)
4848
target_link_libraries(gpud PRIVATE webgpu)

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ endif
1616
default: examples/hello_world/build/hello_world
1717

1818
pch:
19-
mkdir -p build && $(CXX) -std=c++17 $(INCLUDES) -x c++-header gpu.h -o build/gpu.h.pch
19+
mkdir -p build && $(CXX) -std=c++17 $(INCLUDES) -x c++-header gpu.hpp -o build/gpu.hpp.pch
2020

2121
# TODO(avh): change extension based on platform
2222
lib:
@@ -85,7 +85,7 @@ clean:
8585
rm -rf examples/render/build/*
8686
rm -rf examples/shadertui/build/*
8787
rm -rf examples/transpose/build/transpose
88-
rm -f build/gpu.h.pch
88+
rm -f build/gpu.hpp.pch
8989
rm -f build/libgpucpp.so
9090
rm -f build/half
9191

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Here's a GELU kernel implemented (based on the CUDA implementation in [llm.c](ht
9898
#include <cstdio>
9999
#include <future>
100100

101-
#include "gpu.h"
101+
#include "gpu.hpp"
102102

103103
using namespace gpu; // createContext, createTensor, createKernel,
104104
// dispatchKernel, wait, toCPU Bindings,

cmake/find_gpu.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# file name to find
2-
set(FILENAME "gpu.h")
2+
set(FILENAME "gpu.hpp")
33

44
# Function to check for file existence up the directory hierarchy
55
function(find_project_root current_dir filename result_var)

cmake/webgpu.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Specify the filename to search for
2-
set(FILENAME "gpu.h")
2+
set(FILENAME "gpu.hpp")
33

44
get_filename_component(PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
55
get_filename_component(PROJECT_ROOT ${PROJECT_ROOT} DIRECTORY)

examples/float16/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.28)
22
project(float16)
33

4-
set(FILENAME "gpu.h")
4+
set(FILENAME "gpu.hpp")
55

66
get_filename_component(PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
77
get_filename_component(PROJECT_ROOT ${PROJECT_ROOT} DIRECTORY)

examples/float16/run.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include <cstdio>
33
#include <future>
44

5-
#include "gpu.h"
6-
#include "numeric_types/half.h"
5+
#include "gpu.hpp"
6+
#include "numeric_types/half.hpp"
77

88
using namespace gpu; // createContext, createTensor, createKernel,
99
// createShader, dispatchKernel, wait, toCPU

examples/gpu_puzzles/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.28)
22
project(gpu_puzzles)
33

4-
set(FILENAME "gpu.h")
4+
set(FILENAME "gpu.hpp")
55

66
get_filename_component(PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
77
get_filename_component(PROJECT_ROOT ${PROJECT_ROOT} DIRECTORY)

examples/gpu_puzzles/key.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* https://github.com/srush/GPU-Puzzles
44
*/
55

6-
#include "gpu.h"
7-
#include "utils/array_utils.h"
6+
#include "gpu.hpp"
7+
#include "utils/array_utils.hpp"
88
#include <array>
99
#include <cstdio>
1010
#include <future>

examples/gpu_puzzles/run.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* https://github.com/srush/GPU-Puzzles
44
*/
55

6-
#include "gpu.h"
7-
#include "utils/array_utils.h"
6+
#include "gpu.hpp"
7+
#include "utils/array_utils.hpp"
88
#include <array>
99
#include <cstdio>
1010
#include <future>

0 commit comments

Comments
 (0)