From e4e49a117702945066e3e279fa0f005200400cb7 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 12 Jun 2024 15:04:42 +0200 Subject: Separated Encoding and Storage approaches --- modules/codec-json/c++/json.tmpl.hpp | 6 +- modules/codec-json/tests/codec-json.cpp | 32 +++++----- modules/codec-netcdf/c++/netcdf.hpp | 10 ++-- modules/codec-netcdf/tests/codec-netcdf.cpp | 8 +-- modules/codec/c++/data.hpp | 91 ++++++++++++++--------------- modules/codec/c++/interface.hpp | 50 ++++++++-------- modules/codec/tests/codec.cpp | 58 +++++++++--------- modules/codec/tests/csv.cpp | 2 +- modules/remote-sycl/c++/remote.hpp | 6 +- modules/remote-sycl/examples/sycl_basic.cpp | 4 +- 10 files changed, 132 insertions(+), 135 deletions(-) (limited to 'modules') diff --git a/modules/codec-json/c++/json.tmpl.hpp b/modules/codec-json/c++/json.tmpl.hpp index 002d477..3e3a74b 100644 --- a/modules/codec-json/c++/json.tmpl.hpp +++ b/modules/codec-json/c++/json.tmpl.hpp @@ -773,7 +773,7 @@ struct json_decode, ToDecode> { using Schema = schema::Array; template - static error_or decode_flat_level(buffer_view& buff, std::vector>>& to, std::array& index, std::array& dims, bool log_dim){ + static error_or decode_flat_level(buffer_view& buff, std::vector>& to, std::array& index, std::array& dims, bool log_dim){ if constexpr (Level == D) { json_helper::skip_whitespace(buff); try { @@ -830,7 +830,7 @@ struct json_decode, ToDecode> { } template - static error_or decode_unflat_level(std::vector>>& flat, data, ToDecode>& to, std::array& index, std::size_t& flat_index) { + static error_or decode_unflat_level(std::vector>& flat, data, ToDecode>& to, std::array& index, std::size_t& flat_index) { if constexpr ( Level == D ){ auto& flat_data = flat.at(flat_index); to.at(index) = std::move(flat_data); @@ -852,7 +852,7 @@ struct json_decode, ToDecode> { std::array index; std::array dims; std::fill(dims.begin(), dims.end(), 0); - std::vector>> flat_array; + std::vector> flat_array; auto eov = decode_flat_level<0>(buff, flat_array, index, dims, true); if(eov.is_error()){ return eov; diff --git a/modules/codec-json/tests/codec-json.cpp b/modules/codec-json/tests/codec-json.cpp index d6492d2..dd8df8a 100644 --- a/modules/codec-json/tests/codec-json.cpp +++ b/modules/codec-json/tests/codec-json.cpp @@ -28,7 +28,7 @@ using TestStruct = Struct< SAW_TEST("UInt8 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(121); @@ -48,7 +48,7 @@ SAW_TEST("UInt8 write"){ SAW_TEST("UInt16 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(24413); @@ -68,7 +68,7 @@ SAW_TEST("UInt16 write"){ SAW_TEST("UInt32 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(44123); @@ -88,7 +88,7 @@ SAW_TEST("UInt32 write"){ SAW_TEST("UInt64 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(243345543); @@ -108,7 +108,7 @@ SAW_TEST("UInt64 write"){ SAW_TEST("Int8 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(-121); @@ -128,7 +128,7 @@ SAW_TEST("Int8 write"){ SAW_TEST("Int16 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(-24413); @@ -148,7 +148,7 @@ SAW_TEST("Int16 write"){ SAW_TEST("Int32 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(44123); @@ -168,7 +168,7 @@ SAW_TEST("Int32 write"){ SAW_TEST("Int64 write"){ using namespace saw; - data> native_int; + data native_int; data json_int; native_int.set(243345543); @@ -188,7 +188,7 @@ SAW_TEST("Int64 write"){ SAW_TEST("String write and read"){ using namespace saw; - data> nat_str; + data nat_str; data json_str; nat_str.set("foo"); @@ -215,7 +215,7 @@ SAW_TEST("String write and read"){ SAW_TEST("Tuple read and write"){ using namespace saw; - data> native_tup; + data native_tup; data json_tup; auto& nat_zero = native_tup.template get<0>(); @@ -244,7 +244,7 @@ SAW_TEST("Tuple read and write"){ SAW_TEST("Array write"){ using namespace saw; - data> native{3u}; + data native{3u}; data json; native.at(0).set("foo"); @@ -264,7 +264,7 @@ SAW_TEST("Array write"){ SAW_TEST("Three Dim Array write and read"){ using namespace saw; - data> native{2,1,2}; + data native{2,1,2}; data json; native.at(0,0,0).set("multi"); @@ -294,7 +294,7 @@ SAW_TEST("Three Dim Array write and read"){ SAW_TEST("Struct read and write"){ using namespace saw; - data> native; + data native; data json; native.get<"foo">().set(5); @@ -319,7 +319,7 @@ SAW_TEST("Struct read and write"){ SAW_TEST("Int8 read"){ using namespace saw; - data> native_int; + data native_int; data json_int{"43"}; codec json_codec; @@ -337,7 +337,7 @@ SAW_TEST("Int8 read"){ SAW_TEST("Int64 read"){ using namespace saw; - data> native_int; + data native_int; data json_int{"-453"}; codec json_codec; @@ -355,7 +355,7 @@ SAW_TEST("Int64 read"){ SAW_TEST("Tuple Pretty Encode and Decode"){ using namespace saw; - data> native_tup; + data native_tup; data json_tup; auto& nat_zero = native_tup.template get<0>(); diff --git a/modules/codec-netcdf/c++/netcdf.hpp b/modules/codec-netcdf/c++/netcdf.hpp index f93eceb..e89928d 100644 --- a/modules/codec-netcdf/c++/netcdf.hpp +++ b/modules/codec-netcdf/c++/netcdf.hpp @@ -19,7 +19,7 @@ struct Netcdf {}; * Class representing the files system netcdf file */ template -class data { +class data { private: std::vector buff_; public: @@ -44,7 +44,7 @@ public: }; template -class codec{ +class codec{ static_assert(always_false, "NetCDF only supports Structs as a root object"); }; @@ -53,7 +53,7 @@ class codec{ namespace saw { template -class codec...>, encode::Netcdf> { +class codec...>, encode::Netcdf, storage::Default> { private: using Schema = schema::Struct...>; public: @@ -69,7 +69,7 @@ public: * Encoder function */ template - error_or encode(const data& from, data& to) { + error_or encode(const data& from, data& to) { int rc{}; int ncid{}; @@ -131,7 +131,7 @@ public: * Decoder function */ template - error_or decode(data& from_decode, data& to_decode) { + error_or decode(data& from_decode, data& to_decode) { int ncid{}; int rc{}; diff --git a/modules/codec-netcdf/tests/codec-netcdf.cpp b/modules/codec-netcdf/tests/codec-netcdf.cpp index 0c9bc57..a47294f 100644 --- a/modules/codec-netcdf/tests/codec-netcdf.cpp +++ b/modules/codec-netcdf/tests/codec-netcdf.cpp @@ -46,7 +46,7 @@ std::array tests_data_array_nc = { SAW_TEST("NetCDF Struct Primitive write"){ using namespace saw; - data> native; + data native; native.template get<"data">().set(5); native.template get<"other">().set(32.0); @@ -69,7 +69,7 @@ SAW_TEST("NetCDF Struct Primitive read"){ using namespace saw; data netcdf{tests_data_primitive_nc}; - data> native; + data native; codec codec; @@ -84,13 +84,13 @@ SAW_TEST("NetCDF Struct Array read"){ data netcdf{tests_data_array_nc}; - data> native; + data native; codec codec; auto eov = codec.decode(netcdf, native); SAW_EXPECT(eov.is_value(), "Decoding failed"); - auto& arr = native.get<"data">(); + auto& arr = native.template get<"data">(); SAW_EXPECT(arr.get_dim_size(0) == 5, "Incorrect dimension 0"); SAW_EXPECT(arr.get_dim_size(1) == 3, "Incorrect dimension 1"); diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 2a5f082..79f5264 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -20,10 +20,9 @@ struct Default {}; } namespace encode { -template struct Native {}; } -template +template class codec; /* * Helper for the basic message container, so the class doesn't have to be @@ -81,14 +80,14 @@ struct native_data_type> { using type = double; }; -template> +template class data { private: static_assert(always_false, "Type not supported"); }; -template -class data, encode::Native> { +template +class data, encode::Native, storage::Default> { private: typename native_data_type>::type value_; public: @@ -106,19 +105,19 @@ public: typename native_data_type>::type get() const {return value_;} - data, encode::Native> operator*(const data, encode::Native>& rhs)const{ + data, encode::Native, storage::Default> operator*(const data, encode::Native, storage::Default>& rhs)const{ return {get() * rhs.get()}; } - data, encode::Native> operator/(const data, encode::Native>& rhs)const{ + data, encode::Native, storage::Default> operator/(const data, encode::Native, storage::Default>& rhs)const{ return {get() / rhs.get()}; } - data, encode::Native> operator+(const data, encode::Native>& rhs)const{ + data, encode::Native, storage::Default> operator+(const data, encode::Native, storage::Default>& rhs)const{ return {get() + rhs.get()}; } - data, encode::Native> operator-(const data, encode::Native>& rhs)const{ + data, encode::Native, storage::Default> operator-(const data, encode::Native, storage::Default>& rhs)const{ return {get() - rhs.get()}; } @@ -136,7 +135,7 @@ public: * Casts */ template - data> cast_to(){ + data cast_to(){ auto raw_to = static_cast::type>(value_); return {raw_to}; } @@ -145,12 +144,12 @@ public: /** * Mixed precision class for native formats */ -template -class data, schema::Primitive>, encode::Native>{ +template +class data, schema::Primitive>, encode::Native, storage::Default>{ public: using Schema = schema::MixedPrecision, schema::Primitive>; private: - data> value_; + data value_; public: data():value_{}{} @@ -169,9 +168,9 @@ public: * Union type for native data classes */ template -class data...>, encode::Native> { +class data...>, encode::Native, storage::Default> { private: - std::variant>...> value_; + std::variant...> value_; public: data() = default; @@ -179,12 +178,12 @@ public: SAW_DEFAULT_MOVE(data); template - void set(data::value, T...>::type, encode::Native> val){ + void set(data::value, T...>::type, encode::Native, storage::Default> val){ value_ = std::move(val); } template - data::value, T...>::type, encode::Native>& init(){ + data::value, T...>::type, encode::Native, storage::Default>& init(){ value_.template emplace::value>(); return get(); } @@ -195,12 +194,12 @@ public: } template - data::value, T...>::type, encode::Native>& get(){ + data::value, T...>::type, encode::Native, storage::Default>& get(){ return std::get::value>(value_); } template - const data::value, T...>::type, encode::Native>& get() const{ + const data::value, T...>::type, encode::Native, storage::Default>& get() const{ return std::get::value>(value_); } }; @@ -209,12 +208,12 @@ public: * Data class which represents a struct in the native format. */ template -class data...>, encode::Native> { +class data...>, encode::Native, storage::Default> { private: /** * Tuple storing the member values. */ - std::tuple>...> value_; + std::tuple...> value_; public: /** * Default constructor. @@ -233,7 +232,7 @@ public: literal, literals... >::value , T...>::type - , encode::Native>& get(){ + , encode::Native, storage::Default>& get(){ return std::get::value>(value_); } @@ -247,7 +246,7 @@ public: literal, literals... >::value , T...>::type - , encode::Native>& get() const { + , encode::Native, storage::Default>& get() const { return std::get::value>(value_); } @@ -260,21 +259,21 @@ public: }; template -class data, encode::Native> { +class data, encode::Native, storage::Default> { private: - std::tuple>...> value_; + std::tuple...> value_; public: data() = default; SAW_DEFAULT_COPY(data); SAW_DEFAULT_MOVE(data); template - data::type, encode::Native>& get(){ + data::type, encode::Native, storage::Default>& get(){ return std::get(value_); } template - const data::type, encode::Native>& get() const{ + const data::type, encode::Native, storage::Default>& get() const{ return std::get(value_); } @@ -284,11 +283,11 @@ public: }; template -class data, encode::Native> { +class data, encode::Native, storage::Default> { private: // data> dims_; std::array dims_; - std::vector>> value_; + std::vector> value_; uint64_t get_full_size() const { uint64_t s = 1; @@ -320,7 +319,7 @@ class data, encode::Native> { } template - error_or add(saw::data> data){ + error_or add(saw::data data){ /** @todo * Generally the last dimension can always accept a element so to say. * Changing the others would require moving data due to the stride changing. @@ -355,29 +354,29 @@ class data, encode::Native> { static_assert(sizeof...(Dims)==Dim, "Argument size must be equal to the Dimension"); } - data>& at(const std::array& ind){ + data& at(const std::array& ind){ return value_.at(this->get_flat_index(ind)); } - const data>& at(const std::array& ind) const { + const data& at(const std::array& ind) const { return value_.at(this->get_flat_index(ind)); } template - data>& at(Dims... i){ + data& at(Dims... i){ return value_.at(this->get_flat_index(std::array{static_cast(i)...})); } template - const data>& at(Dims... i) const { + const data& at(Dims... i) const { return value_.at(this->get_flat_index(std::array{static_cast(i)...})); } - data>& at(const data>& i){ + data& at(const data>& i){ return value_.at(this->get_flat_index(i)); } - const data>& at(const data>& i)const{ + const data& at(const data>& i)const{ return value_.at(this->get_flat_index(i)); } @@ -425,39 +424,39 @@ private: }; template -class data, encode::Native> { +class data, encode::Native, storage::Default> { private: - //using inner_type = std::array>, multiply_helper::value>; + //using inner_type = std::array, multiply_helper::value>; //std::unique_ptr value_; - using ArrayT = std::array>, ct_multiply::value>; + using ArrayT = std::array, ct_multiply::value>; ArrayT value_; public: data() = default; - data>& at(const std::array& ind){ + data& at(const std::array& ind){ return value_.at(this->get_flat_index(ind)); } - const data>& at(const std::array& ind) const { + const data& at(const std::array& ind) const { return value_.at(this->get_flat_index(ind)); } template - data>& at(Dims... i) { + data& at(Dims... i) { return value_.at(this->get_flat_index({i...})); } template - const data>& at(Dims... i) const { + const data& at(Dims... i) const { return value_.at(this->get_flat_index({i...})); } - data>& at(const data>& i){ + data& at(const data>& i){ return value_.at(this->get_flat_index(i)); } - const data>& at(const data>& i)const{ + const data& at(const data>& i)const{ return value_.at(this->get_flat_index(i)); } @@ -491,7 +490,7 @@ private: * Data type representing string. */ template<> -class data> { +class data { private: /** * The native way to represent strings. diff --git a/modules/codec/c++/interface.hpp b/modules/codec/c++/interface.hpp index 8c6808b..d55b415 100644 --- a/modules/codec/c++/interface.hpp +++ b/modules/codec/c++/interface.hpp @@ -8,32 +8,32 @@ #include "data.hpp" namespace saw { -template +template class function; namespace impl { -template +template struct FuncTypeHelper { - using Type = std::function(data, Ctx)>; + using Type = std::function(data, Ctx)>; }; -template -struct FuncTypeHelper { - using Type = std::function(data)>; +template +struct FuncTypeHelper { + using Type = std::function(data)>; }; } -template -class function, Encode, Context> { +template +class function, Encode, Storage, Context> { private: - typename impl::FuncTypeHelper::Type func_; + typename impl::FuncTypeHelper::Type func_; public: template function(Func func): func_{std::move(func)} {} - error_or> call(data req, Context ctx = {}){ + error_or> call(data req, Context ctx = {}){ if constexpr (std::is_same_v){ (void) ctx; return func_(std::move(req)); @@ -43,17 +43,17 @@ public: } }; -template +template class interface; -template -class interface, Names>...>, Encode, Context> { +template +class interface, Names>...>, Encode, Storage, Context> { public: using Schema = schema::Interface,Names>...>; private: - std::tuple, Encode, Context>...> funcs_; + std::tuple, Encode, Storage, Context>...> funcs_; public: - interface(function, Encode, Context>... funcs): + interface(function, Encode, Storage, Context>... funcs): funcs_{std::move(funcs)...} {} @@ -75,8 +75,8 @@ public: >::value , Responses...>::type > - , - Encode + , Encode + , Storage , Context >& get(){ return std::get::value>(funcs_); @@ -90,14 +90,14 @@ public: Lit, Names... >::value , Responses...>::type - , Encode>> call( + , Encode, Storage>> call( data< typename parameter_pack_type< parameter_key_pack_index< Lit, Names... >::value , Requests...>::type - , Encode> req, + , Encode, Storage> req, Context ctx = {} ){ if constexpr (std::is_same_v) { @@ -109,19 +109,19 @@ public: } }; -template +template struct function_factory { template - static function create(Func func){ - return function {std::move(func)}; + static function create(Func func){ + return function {std::move(func)}; } }; -template +template struct interface_factory { template - static interface create(Func... func){ - return interface{std::move(func)...}; + static interface create(Func... func){ + return interface{std::move(func)...}; } }; } diff --git a/modules/codec/tests/codec.cpp b/modules/codec/tests/codec.cpp index e8a2fb3..10d9d0c 100644 --- a/modules/codec/tests/codec.cpp +++ b/modules/codec/tests/codec.cpp @@ -51,7 +51,7 @@ using TestInterface = Interface< SAW_TEST("One Dimensional Array") { using namespace saw; - data> arr{500u}; + data arr{500u}; int bar = 0; @@ -70,7 +70,7 @@ SAW_TEST("One Dimensional Array") { SAW_TEST("One dim Array Default init"){ using namespace saw; - data> arr; + data arr; SAW_EXPECT(arr.get_dim_size(0) == 0, "Dim should be size 0"); SAW_EXPECT(arr.size() == 0, "Total size should also be zero"); @@ -79,7 +79,7 @@ SAW_TEST("One dim Array Default init"){ SAW_TEST("One dimensional Array Add"){ using namespace saw; - data> arr{5u}; + data arr{5u}; int bar = 0; @@ -96,7 +96,7 @@ SAW_TEST("One dimensional Array Add"){ SAW_TEST("Two Dimensional Array") { using namespace saw; - data> arr{10,30u}; + data arr{10,30u}; int expected_sum = (300 * 301) / 2; @@ -120,7 +120,7 @@ SAW_TEST("Two Dimensional Array") { SAW_TEST("Three Dimensional Array") { using namespace saw; - data> arr{10,10u,3}; + data arr{10,10u,3}; int expected_sum = (300 * 301) / 2; int bar = 0; @@ -146,7 +146,7 @@ SAW_TEST("Three Dimensional Array") { SAW_TEST("KelSimple UInt16 write"){ using namespace saw; - data> native; + data native; data simple; codec codec; @@ -169,7 +169,7 @@ SAW_TEST("KelSimple UInt16 write"){ SAW_TEST("KelSimple UInt32 write"){ using namespace saw; - data> native; + data native; data simple; codec codec; @@ -192,7 +192,7 @@ SAW_TEST("KelSimple UInt32 write"){ SAW_TEST("KelSimple Array write and read back"){ using namespace saw; - data> native{2,3}; + data native{2,3}; data simple; codec codec; @@ -225,7 +225,7 @@ SAW_TEST("KelSimple Array write and read back"){ SAW_TEST("KelSimple Struct write and read back"){ using namespace saw; - data> native; + data native; data simple; auto& tda = native.template get<"two_dim_array">(); @@ -256,7 +256,7 @@ SAW_TEST("KelSimple Struct write and read back"){ SAW_TEST("Native Union same type compilation"){ using namespace saw; - data> native; + data native; native.template init<"two">().set(50u); @@ -269,10 +269,10 @@ SAW_TEST("Native Union same type compilation"){ SAW_TEST("KelSimple Union write and read back"){ using namespace saw; - data> native; + data native; data simple; - native.template set<"number">(data>{}); + native.template set<"number">(data{}); native.template get<"number">().set(410); codec codec; @@ -293,7 +293,7 @@ SAW_TEST("KelSimple Union write and read back"){ SAW_TEST("KelSimple Tuple write and read back"){ using namespace saw; - data> native; + data native; data simple; auto& tda = native.template get<0>(); @@ -324,7 +324,7 @@ SAW_TEST("KelSimple Tuple write and read back"){ SAW_TEST("KelSimple String write and read back"){ using namespace saw; - data> native; + data native; data simple; std::string str = "FooBananaJoe"; @@ -349,14 +349,14 @@ SAW_TEST("Function basics"){ using namespace saw; { - data> native; + data native; native.get<0>().set(5); native.get<1>().set(40); - auto func_add = function_factory>::create( - [](data> req){ - data> resp; + auto func_add = function_factory::create( + [](data req){ + data resp; resp.set(req.get<0>().get() + req.get<1>().get()); @@ -375,36 +375,36 @@ SAW_TEST("Function basics"){ SAW_TEST("Interface basics"){ using namespace saw; - data> native; + data native; auto func_add = - [](data> req){ - data> resp; + [](data req){ + data resp; resp.set(req.get<0>().get() + req.get<1>().get()); return resp; }; auto func_sub = - [](data> req){ - data> resp; + [](data req){ + data resp; resp.set(req.get<0>().get() - req.get<1>().get()); return resp; }; - auto func_multiply = [](data> req){ - data> resp; + auto func_multiply = [](data req){ + data resp; resp.set(req.get<0>().get() * req.get<1>().get()); return resp; }; - auto iface = interface_factory>::create(std::move(func_add), std::move(func_sub), std::move(func_multiply)); + auto iface = interface_factory::create(std::move(func_add), std::move(func_sub), std::move(func_multiply)); { - data> native; + data native; native.get<0>().set(5); native.get<1>().set(40); @@ -415,7 +415,7 @@ SAW_TEST("Interface basics"){ SAW_EXPECT(val.get() == 45, "Sum is incorrect"); } { - data> native; + data native; native.get<0>().set(5); native.get<1>().set(40); @@ -426,7 +426,7 @@ SAW_TEST("Interface basics"){ SAW_EXPECT(val.get() == -35, "Sum is incorrect"); } { - data> native; + data native; native.get<0>().set(5); native.get<1>().set(40); diff --git a/modules/codec/tests/csv.cpp b/modules/codec/tests/csv.cpp index 04813c5..638b864 100644 --- a/modules/codec/tests/csv.cpp +++ b/modules/codec/tests/csv.cpp @@ -22,7 +22,7 @@ SAW_TEST("Codec Csv Encode Basic"){ using namespace saw; size_t n_size = 3; - data > native_data{n_size}; + data native_data{n_size}; { auto& row = native_data.at(0); row.template get<"string">().set("foo"); diff --git a/modules/remote-sycl/c++/remote.hpp b/modules/remote-sycl/c++/remote.hpp index d311ca5..d956314 100644 --- a/modules/remote-sycl/c++/remote.hpp +++ b/modules/remote-sycl/c++/remote.hpp @@ -190,14 +190,12 @@ public: /** * Rpc call */ - template + template error_or< id< typename schema_member_type::type::ResponseT > - > call(data_or_id::type::RequestT, Encoding> input){ - - + > call(data_or_id::type::RequestT, ClientAllocation> input){ /** * First check if it's data or an id. diff --git a/modules/remote-sycl/examples/sycl_basic.cpp b/modules/remote-sycl/examples/sycl_basic.cpp index 3f92cdb..41aa2a1 100644 --- a/modules/remote-sycl/examples/sycl_basic.cpp +++ b/modules/remote-sycl/examples/sycl_basic.cpp @@ -21,9 +21,9 @@ int main(){ auto rpc_server = listen_basic_sycl(remote_ctx, *rmt_addr); - saw::id next_id{0u}; + saw::id> next_id{0u}; { - auto eov = rpc_server.template call<"increment">(saw::data>{1u}); + auto eov = rpc_server.template call<"increment">(saw::data, saw::encode::Native>{1u}); if(eov.is_error()){ auto& err = eov.get_error(); std::cerr<<"Error: "<