Skip to content

Commit

Permalink
Merge branch 'fea_c_api_mg_implementation' of https://github.com/chuc…
Browse files Browse the repository at this point in the history
…khastings/cugraph into fea_c_api_mg_implementation
  • Loading branch information
rlratzel committed Mar 16, 2022
2 parents 87b1279 + b605603 commit 25967b7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
8 changes: 4 additions & 4 deletions cpp/include/cugraph_c/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ extern "C" {
#endif

typedef struct {
int align_;
int32_t align_;
} cugraph_type_erased_device_array_t;

typedef struct {
int align_;
int32_t align_;
} cugraph_type_erased_device_array_view_t;

typedef struct {
int align_;
int32_t align_;
} cugraph_type_erased_host_array_t;

typedef struct {
int align_;
int32_t align_;
} cugraph_type_erased_host_array_view_t;

/**
Expand Down
6 changes: 4 additions & 2 deletions cpp/include/cugraph_c/error.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@

#pragma once

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -31,7 +33,7 @@ typedef enum cugraph_error_code_ {
} cugraph_error_code_t;

typedef struct cugraph_error_ {
int align_;
int32_t align_;
} cugraph_error_t;

/**
Expand Down
4 changes: 3 additions & 1 deletion cpp/include/cugraph_c/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ extern "C" {
#endif

typedef struct {
int align_;
int32_t align_;
} cugraph_graph_t;

typedef struct {
bool_t is_symmetric;
bool_t is_multigraph;
} cugraph_graph_properties_t;

// FIXME: Add support for specifying isloated vertices
/**
* @brief Construct an SG graph
*
Expand Down Expand Up @@ -73,6 +74,7 @@ cugraph_error_code_t cugraph_sg_graph_create(const cugraph_resource_handle_t* ha
// but didn't want to confuse with original cugraph_free_graph
void cugraph_sg_graph_free(cugraph_graph_t* graph);

// FIXME: Add support for specifying isloated vertices
/**
* @brief Construct an MG graph
*
Expand Down
7 changes: 5 additions & 2 deletions cpp/include/cugraph_c/resource_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ typedef int8_t byte_t;
typedef enum data_type_id_ { INT32 = 0, INT64, FLOAT32, FLOAT64, NTYPES } data_type_id_t;

/* sizes in Bytes for data_type_id_t*/
extern int data_type_sz[];
extern size_t data_type_sz[];

typedef struct cugraph_resource_handle_ {
int align_;
int32_t align_;
} cugraph_resource_handle_t;

// FIXME: Don't really want a raft handle here. We really want to be able to
// configure the resource handle ourselves. But that requires a bunch
// of logic that's currently only available in python.
/**
* @brief Construct a resource handle
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/cugraph_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ cugraph_error_code_t extract_rw_result(cugraph_rw_ret_t* p_rw_ret, cugraph_devic
} // namespace helpers

extern "C" {
int data_type_sz[] = {4, 8, 4, 8};
size_t data_type_sz[] = {4, 8, 4, 8};
}

bool_t runtime_assert(bool_t statement_truth_value, const char* error_msg)
Expand Down
5 changes: 4 additions & 1 deletion cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,12 @@ target_link_libraries(cugraph_c_testutil
)


# FIXME: Disabling these tests, they test an older version of the API which
# will be deleted in this release. Leaving them here to help me remember :-)
#ConfigureCTest(CAPI_CREATE_SG_GRAPH_ENVELOPE_TEST c_api/create_sg_graph_envelope_test.c)
ConfigureCTest(CAPI_CREATE_GRAPH_TEST c_api/create_graph_test.c)
#ConfigureCTest(CAPI_RANDOM_WALKS_TEST c_api/random_walks_test.c)

ConfigureCTest(CAPI_CREATE_GRAPH_TEST c_api/create_graph_test.c)
ConfigureCTest(CAPI_PAGERANK_TEST c_api/pagerank_test.c)
ConfigureCTest(CAPI_BFS_TEST c_api/bfs_test.c)
ConfigureCTest(CAPI_SSSP_TEST c_api/sssp_test.c)
Expand Down

0 comments on commit 25967b7

Please sign in to comment.