48 .access_letters =
"c",
49 .access_name =
"config",
50 .value_name =
"CONFIG",
51 .description =
"Configuration file to use."
55 .access_letters =
"h",
56 .access_name =
"help",
58 .description =
"Shows the command help"
62 .access_letters =
"a",
63 .access_name =
"advanced-help",
65 .description =
"Shows the advanced help"
69 int main(
int argc,
char *argv[])
72 const char *config = NULL;
83 printf(
"HELP THE FALCONS ARE CHASING ME...\n");
86 printf(
"Copyright (C) 2022 2666680 Ontario Inc. O\\A Arc Compute\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n\n");
87 printf(
"Usage: gvm-cli [OPTION]...\n");
88 printf(
"Reimplementation of mdev-gpu under the GVM User Suite\n\n");
95 printf(
"Why must the Tensor Cores crush the little cpu man?\n");
109 printf(
"Registered MDevs on the system.\n");
CAG_PUBLIC char cag_option_get(const cag_option_context *context)
Gets the identifier of the option.
CAG_PUBLIC void cag_option_prepare(cag_option_context *context, const cag_option *options, size_t option_count, int argc, char **argv)
Prepare argument options context for parsing.
CAG_PUBLIC bool cag_option_fetch(cag_option_context *context)
Fetches an option from the argument list.
CAG_PUBLIC const char * cag_option_get_value(const cag_option_context *context)
Gets the value from the option.
#define CAG_ARRAY_SIZE(arr)
CAG_PUBLIC void cag_option_print(const cag_option *options, size_t option_count, FILE *destination)
Prints all options to the terminal.
struct GpuConfigs get_configs(const char *name)
Parses a config file.
void register_nv_mgr_mdevs(struct NvMdev *mgr)
Registers mdevs on the OS.
void create_nv_mgr_mdevs(struct NvMdev *mgr, struct Gpu *limited, size_t gpu_size, struct MDevRequest *requested, size_t mdev_size)
Creates necessary mediated devices on GPUs.
struct NvMdev create_nv_mgr()
Creates a NVIDIA manager object.
void free_nv_mgr(struct NvMdev *mgr)
Deletes a NVIDIA manager object.
int main(int argc, char *argv[])
static struct cag_option options[]
Structure to handle GPU Configurations.
struct MDevRequest * requests
List of requested mdevs.
size_t mdev_size
How many requested mdevs are in the list of mdevs.
size_t gpu_size
How many gpus are in the list of gpus.
struct Gpu * gpus
List of gpus.
Structure to provide a list of GPU configurations.
size_t config_size
Size of the configuration list.
struct GpuConfig * configs
List of configurations.
Structure for managing the mediated stack.