blob: c7101564fd61c573ebf10a20b78e6c373bb55294 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
* File: print.hpp
* Purpose: OCL Print library
* Author: Amlal El Mahrouss. (amlal@nekernel.org)
* Copyright 2025
*/
#ifndef _OCL_PRINT_HPP
#define _OCL_PRINT_HPP
#include <iostream>
namespace ocl::io
{
template <typename T>
inline void print(T fmt) noexcept
{
std::cout << fmt;
}
inline void print() noexcept
{
}
template <typename... Args>
inline void print(Args... fmt) noexcept
{
print(fmt...);
print();
}
template <typename T, typename... Args>
inline void print(T fmt, Args... other) noexcept
{
std::cout << fmt;
print(other...);
}
template <typename... T>
inline void println(T... fmt) noexcept
{
print(fmt...);
print("\n");
}
} // namespace ocl::io
#endif // ifndef _OCL_PRINT_HPP
|