MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / CreateUcpContext

Function CreateUcpContext

engine/tests/allocation_pool/allocation_pool.cpp:44–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44ucp_context_h CreateUcpContext() {
45 ucp_config_t *config;
46 ucs_status_t status = ucp_config_read(NULL, NULL, &config);
47 CheckError(status != UCS_OK, "ucp_config_read", [](){});
48
49 ucp_params_t ucp_params;
50 std::memset(&ucp_params, 0, sizeof(ucp_params));
51 ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES |
52 UCP_PARAM_FIELD_REQUEST_SIZE |
53 UCP_PARAM_FIELD_REQUEST_INIT;
54 ucp_params.features = UCP_FEATURE_TAG | UCP_FEATURE_WAKEUP;
55 ucp_params.request_size = sizeof(ucx_request);
56 ucp_params.request_init = request_init;
57
58 ucp_context_h ucp_context;
59 status = ucp_init(&ucp_params, config, &ucp_context);
60
61 const bool hasPrintUcpConfig = false;
62 if (hasPrintUcpConfig) {
63 ucp_config_print(config, stdout, NULL, UCS_CONFIG_PRINT_CONFIG);
64 }
65
66 ucp_config_release(config);
67 CheckError(status != UCS_OK, "ucp_init", [](){});
68
69 return ucp_context;
70 }
71
72
73TEST_F(AllocationPoolTest, initialize_test) {

Callers 1

TEST_FFunction · 0.70

Calls 1

CheckErrorFunction · 0.70

Tested by

no test coverage detected