Lines Matching +defs:format +defs:message
39 on the buffer format. Support presently exists for 8/16/32/64 signed and
130 const char *format = nullptr;
137 void *ptr, ssize_t itemsize, const char *format, ssize_t ndim,
142 : ptr(ptr), itemsize(itemsize), format(format), ndim(ndim),
152 : nb_buffer_info(view->buf, view->itemsize, view->format, view->ndim,
188 static const char *format() { return "?"; }
192 static const char *format() { return "b"; }
196 static const char *format() { return "B"; }
200 static const char *format() { return "h"; }
204 static const char *format() { return "H"; }
208 static const char *format() { return "i"; }
212 static const char *format() { return "I"; }
216 static const char *format() { return "q"; }
220 static const char *format() { return "Q"; }
224 static const char *format() { return "f"; }
228 static const char *format() { return "d"; }
840 std::string message;
841 llvm::raw_string_ostream os(message);
844 throw nb::value_error(message.c_str());
863 std::string message;
864 llvm::raw_string_ostream os(message);
870 throw nb::value_error(message.c_str());
914 std::string message = "Illegal element type for DenseElementsAttr: ";
915 message.append(nb::cast<std::string>(nb::repr(nb::cast(elementAttr))));
916 throw nb::value_error(message.c_str());
920 std::string message =
922 message.append(nb::cast<std::string>(nb::repr(nb::cast(shapedType))));
923 throw nb::value_error(message.c_str());
928 std::string message =
930 message.append(nb::cast<std::string>(nb::repr(nb::cast(shapedType))));
931 message.append(", element=");
932 message.append(nb::cast<std::string>(nb::repr(nb::cast(elementAttr))));
933 throw nb::value_error(message.c_str());
946 std::string format;
1062 static bool isUnsignedIntegerFormat(std::string_view format) {
1063 if (format.empty())
1065 char code = format[0];
1070 static bool isSignedIntegerFormat(std::string_view format) {
1071 if (format.empty())
1073 char code = format[0];
1105 // Detect format codes that are suitable for bulk loading. This includes
1113 std::string_view format(view.format);
1114 if (format == "f") {
1118 } else if (format == "d") {
1122 } else if (format == "e") {
1126 } else if (format == "?") {
1131 } else if (isSignedIntegerFormat(format)) {
1152 } else if (isUnsignedIntegerFormat(format)) {
1177 std::string("unimplemented array format conversion from format: ") +
1178 std::string(format));
1292 const char *format;
1294 format = explicitFormat;
1296 format = nb_format_descriptor<Type>::format();
1299 data, sizeof(Type), format, rank, std::move(shape), std::move(strides),
1338 view->format = const_cast<char *>(info->format);