20 inline namespace _V1 {
25 throw sycl::runtime_error(
"invalid spec constant size",
26 PI_ERROR_INVALID_VALUE);
27 auto *BytePtr =
reinterpret_cast<const char *
>(Val);
28 this->Bytes.assign(BytePtr, BytePtr + Size);
33 for (
const auto &E : Reg) {
34 Dst.insert(Dst.end(), E.first.begin(), E.first.end());
41 Out <<
"spec_constant_impl"
42 <<
" { Size=" << V.
getSize() <<
" IsSet=" << V.
isSet() <<
" Val=[";
43 std::ios_base::fmtflags FlagsSav = Out.flags();
45 for (
unsigned I = 0; I < V.
getSize(); ++I) {
46 Out << (I == 0 ?
"" :
" ") <<
static_cast<int>(*(V.
getValuePtr() + I));
48 Out <<
"]" << FlagsSav;
void set(size_t Size, const void *Val)
const char * getValuePtr() const
std::map< std::string, spec_constant_impl > SpecConstRegistryT
void stableSerializeSpecConstRegistry(const SpecConstRegistryT &Reg, SerializedObj &Dst)
std::ostream & operator<<(std::ostream &os, std::optional< T > const &opt)
std::vector< unsigned char > SerializedObj