Commit 88b77181 authored by Chao Liu's avatar Chao Liu
Browse files

rename files, added header guard, added namespace

parent 05e04665
#pragma once #ifndef CK_BASE_HPP
#define CK_BASE_HPP
namespace ck {
__device__ index_t get_thread_local_1d_id() { return threadIdx.x; } __device__ index_t get_thread_local_1d_id() { return threadIdx.x; }
...@@ -22,7 +25,7 @@ __host__ __device__ constexpr bool is_same_type(X, Y) ...@@ -22,7 +25,7 @@ __host__ __device__ constexpr bool is_same_type(X, Y)
return is_same<X, Y>::value; return is_same<X, Y>::value;
} }
namespace mod_conv { // namespace mod_conv namespace math { // namespace math
template <class T, T s> template <class T, T s>
struct scales struct scales
{ {
...@@ -110,4 +113,7 @@ __host__ __device__ constexpr T lcm(T x, Ts... xs) ...@@ -110,4 +113,7 @@ __host__ __device__ constexpr T lcm(T x, Ts... xs)
return max(x, xs...); return max(x, xs...);
} }
} // namespace mod_conv } // namespace math
} // namspace ck
#endif
#pragma once #ifndef CK_VECTOR_TYPE_HPP
#include "config.h" #define CK_VECTOR_TYPE_HPP
#include "config.hpp"
#include "integral_constant.hpp" #include "integral_constant.hpp"
namespace ck {
template <class T, index_t N> template <class T, index_t N>
struct vector_type struct vector_type
{ {
...@@ -184,3 +188,7 @@ struct vector_type<char4, 2> ...@@ -184,3 +188,7 @@ struct vector_type<char4, 2>
using MemoryType = int64_t; using MemoryType = int64_t;
}; };
#endif #endif
} // namespace ck
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment