21#include <fmt/format.h>
22#include <fmt/printf.h>
23#include <fmt/ranges.h>
27struct fmt::formatter<sycl::vec<T, 2>> {
29 template<
typename ParseContext>
30 constexpr auto parse(ParseContext &ctx) {
34 template<
typename FormatContext>
35 auto format(sycl::vec<T, 2> c, FormatContext &ctx)
const {
36 return fmt::format_to(ctx.out(),
"({},{})", c.x(), c.y());
41struct fmt::formatter<sycl::vec<T, 3>> {
43 template<
typename ParseContext>
44 constexpr auto parse(ParseContext &ctx) {
48 template<
typename FormatContext>
49 auto format(sycl::vec<T, 3> c, FormatContext &ctx)
const {
50 return fmt::format_to(ctx.out(),
"({},{},{})", c.x(), c.y(), c.z());
55struct fmt::formatter<sycl::vec<T, 4>> {
57 template<
typename ParseContext>
58 constexpr auto parse(ParseContext &ctx) {
62 template<
typename FormatContext>
63 auto format(sycl::vec<T, 4> c, FormatContext &ctx)
const {
64 return fmt::format_to(ctx.out(),
"({},{},{},{})", c.x(), c.y(), c.z(), c.w());
69struct fmt::formatter<sycl::vec<T, 8>> {
71 template<
typename ParseContext>
72 constexpr auto parse(ParseContext &ctx) {
76 template<
typename FormatContext>
77 auto format(sycl::vec<T, 8> c, FormatContext &ctx)
const {
78 return fmt::format_to(
80 "({},{},{},{},{},{},{},{})",
93struct fmt::formatter<sycl::vec<T, 16>> {
95 template<
typename ParseContext>
96 constexpr auto parse(ParseContext &ctx) {
100 template<
typename FormatContext>
101 auto format(sycl::vec<T, 16> c, FormatContext &ctx)
const {
102 return fmt::format_to(
104 "(({},{},{},{}),({},{},{},{}),({},{},{},{}),({},{},{},{}))",