Cleaning up null HAL driver options.
diff --git a/runtime/src/iree/hal/drivers/null/api.h b/runtime/src/iree/hal/drivers/null/api.h
index ad47173..2ae6ecd 100644
--- a/runtime/src/iree/hal/drivers/null/api.h
+++ b/runtime/src/iree/hal/drivers/null/api.h
@@ -27,11 +27,11 @@
int reserved;
} iree_hal_null_device_options_t;
-// Initializes |out_params| to default values.
+// Initializes |out_options| to default values.
IREE_API_EXPORT void iree_hal_null_device_options_initialize(
- iree_hal_null_device_options_t* out_params);
+ iree_hal_null_device_options_t* out_options);
-// Creates a {Null} HAL device with the given |params|.
+// Creates a {Null} HAL device with the given |options|.
//
// The provided |identifier| will be used by programs to distinguish the device
// type from other HAL implementations. If compiling programs with the IREE
diff --git a/runtime/src/iree/hal/drivers/null/device.c b/runtime/src/iree/hal/drivers/null/device.c
index d91c23e..937b213 100644
--- a/runtime/src/iree/hal/drivers/null/device.c
+++ b/runtime/src/iree/hal/drivers/null/device.c
@@ -18,6 +18,26 @@
#include "iree/hal/utils/file_transfer.h"
//===----------------------------------------------------------------------===//
+// iree_hal_null_device_options_t
+//===----------------------------------------------------------------------===//
+
+IREE_API_EXPORT void iree_hal_null_device_options_initialize(
+ iree_hal_null_device_options_t* out_options) {
+ memset(out_options, 0, sizeof(*out_options));
+ // TODO(null): set defaults based on compiler configuration. Flags should not
+ // be used as multiple devices may be configured within the process or the
+ // hosting application may be authored in python/etc that does not use a flags
+ // mechanism accessible here.
+}
+
+static iree_status_t iree_hal_null_device_options_verify(
+ const iree_hal_null_device_options_t* options) {
+ // TODO(null): verify that the parameters are within expected ranges and any
+ // requested features are supported.
+ return iree_ok_status();
+}
+
+//===----------------------------------------------------------------------===//
// iree_hal_null_device_t
//===----------------------------------------------------------------------===//
@@ -42,22 +62,6 @@
return (iree_hal_null_device_t*)base_value;
}
-void iree_hal_null_device_options_initialize(
- iree_hal_null_device_options_t* out_options) {
- memset(out_options, 0, sizeof(*out_options));
- // TODO(null): set defaults based on compiler configuration. Flags should not
- // be used as multiple devices may be configured within the process or the
- // hosting application may be authored in python/etc that does not use a flags
- // mechanism accessible here.
-}
-
-static iree_status_t iree_hal_null_device_options_verify(
- const iree_hal_null_device_options_t* options) {
- // TODO(null): verify that the parameters are within expected ranges and any
- // requested features are supported.
- return iree_ok_status();
-}
-
iree_status_t iree_hal_null_device_create(
iree_string_view_t identifier,
const iree_hal_null_device_options_t* options,
diff --git a/runtime/src/iree/hal/drivers/null/driver.c b/runtime/src/iree/hal/drivers/null/driver.c
index 78cf511..d9fd2a3 100644
--- a/runtime/src/iree/hal/drivers/null/driver.c
+++ b/runtime/src/iree/hal/drivers/null/driver.c
@@ -9,6 +9,30 @@
#include "iree/hal/drivers/null/api.h"
//===----------------------------------------------------------------------===//
+// iree_hal_null_driver_options_t
+//===----------------------------------------------------------------------===//
+
+IREE_API_EXPORT void iree_hal_null_driver_options_initialize(
+ iree_hal_null_driver_options_t* out_options) {
+ memset(out_options, 0, sizeof(*out_options));
+
+ // TODO(null): set defaults based on compiler configuration. Flags should not
+ // be used as multiple devices may be configured within the process or the
+ // hosting application may be authored in python/etc that does not use a flags
+ // mechanism accessible here.
+
+ iree_hal_null_device_options_initialize(&out_options->default_device_options);
+}
+
+static iree_status_t iree_hal_null_driver_options_verify(
+ const iree_hal_null_driver_options_t* options) {
+ // TODO(null): verify that the parameters are within expected ranges and any
+ // requested features are supported.
+
+ return iree_ok_status();
+}
+
+//===----------------------------------------------------------------------===//
// iree_hal_null_driver_t
//===----------------------------------------------------------------------===//
@@ -35,26 +59,6 @@
return (iree_hal_null_driver_t*)base_value;
}
-void iree_hal_null_driver_options_initialize(
- iree_hal_null_driver_options_t* out_options) {
- memset(out_options, 0, sizeof(*out_options));
-
- // TODO(null): set defaults based on compiler configuration. Flags should not
- // be used as multiple devices may be configured within the process or the
- // hosting application may be authored in python/etc that does not use a flags
- // mechanism accessible here.
-
- iree_hal_null_device_options_initialize(&out_options->default_device_options);
-}
-
-static iree_status_t iree_hal_null_driver_options_verify(
- const iree_hal_null_driver_options_t* options) {
- // TODO(null): verify that the parameters are within expected ranges and any
- // requested features are supported.
-
- return iree_ok_status();
-}
-
IREE_API_EXPORT iree_status_t iree_hal_null_driver_create(
iree_string_view_t identifier,
const iree_hal_null_driver_options_t* options,