Skip to content

Commit

Permalink
A load more fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Pencilcaseman committed Mar 25, 2024
1 parent 75c5ff2 commit b6fd846
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ fn main() {
builder = builder.header("./hasty_impl/include/helper/define_opencl.h");
}

builder = builder.header("./hasty_impl/include/hasty_impl.h")
.clang_arg("-I./hasty_impl/include")
builder = builder // .header("./hasty_impl/include/hasty_impl.h")
// .clang_arg("-I./hasty_impl/include")
// .header("./hasty_impl/include/hasty_blas.h")
.header("./hasty_impl/include/level2/gemv.h")
.header("./hasty_impl/include/level3/gemm.h")
// .header("./hasty_impl/include/hasty_opencl.h")
.header("./hasty_impl/include/ocl/opencl_error_types.h")
.header("./hasty_impl/include/ocl/opencl_configure.h")
.header("./hasty_impl/include/ocl/opencl_memory_impl.h");
.header("./hasty_impl/include/opencl/opencl_error_types.h")
.header("./hasty_impl/include/opencl/opencl_configure.h")
.header("./hasty_impl/include/opencl/opencl_memory_impl.h");

let bindings = builder
.generate()
Expand Down
2 changes: 1 addition & 1 deletion hasty_impl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ file(GLOB_RECURSE HASTY_IMPL_SOURCE
)

add_library(hasty_impl STATIC ${HASTY_IMPL_SOURCE}
include/ocl/opencl_memory.hpp
include/opencl/opencl_memory.hpp
src/opencl/opencl_memory.cpp)

target_include_directories(hasty_impl PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
Expand Down
4 changes: 2 additions & 2 deletions hasty_impl/include/hasty_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define HASTY_IMPL_H
#ifndef HASTY_IMPL_HAS_BLAS

#include <hasty_blas.h>
#include <hasty_opencl.h>
#include "./hasty_blas.h"
#include "./hasty_opencl.h"

#endif // HASTY_IMPL_HAS_BLAS
#endif // HASTY_IMPL_H
8 changes: 4 additions & 4 deletions hasty_impl/include/hasty_opencl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#define HASTY_IMPL_OPENCL_H
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl_errors.hpp>
#include <ocl/opencl_global.hpp>
#include <ocl/opencl_configure.h>
#include <ocl/opencl_memory.hpp>
#include "./opencl/opencl_errors.hpp"
#include "./opencl/opencl_global.hpp"
#include "./opencl/opencl_configure.h"
#include "./opencl/opencl_memory.hpp"

#endif // HASTY_IMPL_HAS_OPENCL
#endif // HASTY_IMPL_OPENCL_H
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define HASTY_IMPL_OPENCL_ERRORS_HPP
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl.hpp>
#include "./opencl.hpp"
#include <clblast.h>
#include <ocl/opencl_error_types.h>
#include "./opencl_error_types.h"

OpenCLErrorCode get_opencl_error_code(int64_t error);
OpenCLErrorCode getCLBlastErrorCode(clblast::StatusCode status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define HASTY_IMPL_OPENCL_GLOBAL
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl.hpp>
#include "./opencl.hpp"

namespace global {
extern std::vector<cl::Device> openclDevices;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#define HASTY_IMPL_OPENCL_MEMORY_HPP
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl.hpp>
#include <ocl/opencl_error_types.h>
#include <ocl/opencl_errors.hpp>
#include <ocl/opencl_global.hpp>
#include <ocl/opencl_memory_impl.h>
#include "./opencl.hpp"
#include "./opencl_error_types.h"
#include "./opencl_errors.hpp"
#include "./opencl_global.hpp"
#include "./opencl_memory_impl.h"

OpenCLErrorCode opencl_allocate(size_t bytes, OpenCLMemoryType mem_type, cl::Buffer **result);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdbool.h>
#include <stdint.h>
#include <ocl/opencl_error_types.h>
#include "./opencl_error_types.h"

#ifdef __cplusplus
extern "C" {
Expand Down
6 changes: 3 additions & 3 deletions hasty_impl/src/opencl/opencl_configure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <vector>
#include <iostream>
#include <hasty_opencl.h>
#include <ocl/opencl.hpp>
#include <ocl/opencl_errors.hpp>
#include <ocl/opencl_global.hpp>
#include <opencl/opencl.hpp>
#include <opencl/opencl_errors.hpp>
#include <opencl/opencl_global.hpp>
#include <clblast.h>

int64_t openclDeviceCompute(const cl::Device &device) {
Expand Down
4 changes: 2 additions & 2 deletions hasty_impl/src/opencl/opencl_errors.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl.hpp>
#include <opencl/opencl.hpp>
#include <opencl/opencl_errors.hpp>
#include <clblast.h>
#include <ocl/opencl_errors.hpp>
#include <map>

//const char *getOpenCLErrorString(int64_t error) {
Expand Down
2 changes: 1 addition & 1 deletion hasty_impl/src/opencl/opencl_global.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl_global.hpp>
#include <opencl/opencl_global.hpp>

namespace global {
std::vector<cl::Device> openclDevices;
Expand Down
2 changes: 1 addition & 1 deletion hasty_impl/src/opencl/opencl_memory.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef HASTY_IMPL_HAS_OPENCL

#include <ocl/opencl_memory.hpp>
#include <opencl/opencl_memory.hpp>

OpenCLErrorCode opencl_allocate(uint64_t bytes, OpenCLMemoryType mem_type, cl::Buffer **result) {
cl_mem_flags converted_type = -1;
Expand Down

0 comments on commit b6fd846

Please sign in to comment.