Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:

steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- setup_remote_docker
- run-cibuildwheel

Expand All @@ -67,6 +69,8 @@ jobs:

steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run-cibuildwheel

build-and-test-osx:
Expand Down Expand Up @@ -94,6 +98,8 @@ jobs:

steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run:
name: build sdist
command: |
Expand All @@ -119,6 +125,8 @@ jobs:

steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run-cibuildwheel

deploy-all:
Expand Down Expand Up @@ -149,6 +157,8 @@ jobs:

steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run:
name: install dependencies
command: |
Expand Down Expand Up @@ -178,6 +188,8 @@ jobs:

steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run:
name: install doxygen
command: sudo apt-get install doxygen
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = testscpp/Catch2
url = https://github.com/catchorg/Catch2.git
branch = v2.x
[submodule "extern/taskflow"]
path = extern/taskflow
url = https://github.com/taskflow/taskflow.git
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include pyproject.toml
recursive-include dwave/preprocessing/include/ *.hpp *.h
recursive-include dwave/preprocessing *.pyx *.pxd *.pyx.src
graft extern/taskflow/taskflow
include extern/taskflow/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef HELPER_GRAPH_ALGORITHM_HPP_INCLUDED
#define HELPER_GRAPH_ALGORITHM_HPP_INCLUDED

#include <limits>
#include <algorithm>
#include <atomic>
#include <iostream>
Expand Down Expand Up @@ -70,7 +71,6 @@ int breadthFirstSearchResidual(
std::vector<std::vector<EdgeType>> &adjacency_list, int start_vertex,
std::vector<int> &depth_values, bool reverse = false,
bool print_result = false) {
using capacity_t = typename EdgeType::capacity_type;
int num_vertices = adjacency_list.size();
int UNVISITED = num_vertices;
vector_based_queue<int> vertex_queue(num_vertices);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef IMPLICATION_NETWORK_HPP_INCLUDED
#define IMPLICATION_NETWORK_HPP_INCLUDED

#include <assert.h>
#include "helper_graph_algorithms.hpp"
#include "mapping_policy.hpp"
#include "push_relabel.hpp"
Expand All @@ -36,9 +37,9 @@ template <typename capacity_t> class ImplicationEdge {
ImplicationEdge(int from_vertex, int to_vertex, capacity_t capacity,
capacity_t reverse_capacity, int reverse_edge_index,
int symmetric_edge_index)
: from_vertex(from_vertex), to_vertex(to_vertex), residual(capacity),
: from_vertex(from_vertex), to_vertex(to_vertex),
reverse_edge_index(reverse_edge_index),
symmetric_edge_index(symmetric_edge_index) {
symmetric_edge_index(symmetric_edge_index), residual(capacity) {
assert((!capacity || !reverse_capacity) &&
"Either capacity or reverse edge capacity must be zero.");
_encoded_capacity = (!capacity) ? -reverse_capacity : capacity;
Expand Down Expand Up @@ -116,7 +117,7 @@ class stronglyConnectedComponentsInfo {
stronglyConnectedComponentsInfo(int num_components,
std::vector<int> vertex_to_component_map,
mapper_t &mapper)
: num_components(num_components), num_vertices(mapper.num_vertices()),
: num_vertices(mapper.num_vertices()), num_components(num_components),
vertex_to_component_map(vertex_to_component_map) {
components.resize(num_components);
std::vector<int> component_sizes(num_components, 0);
Expand Down Expand Up @@ -290,7 +291,6 @@ ImplicationNetwork<capacity_t>::ImplicationNetwork(PosiformInfo &posiform) {

for (int variable = 0; variable < _num_variables; variable++) {
int from_vertex = _mapper.variable_to_vertex(variable);
int from_vertex_complement = _mapper.complement(from_vertex);
auto quadratic_span = posiform.getQuadratic(variable);
auto it = quadratic_span.first;
auto it_end = quadratic_span.second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#ifndef IMPLICATION_NETWORK_MAPPING_POLICY_HPP_INCLUDED
#define IMPLICATION_NETWORK_MAPPING_POLICY_HPP_INCLUDED

#include <assert.h>

// PLEASE DO NOT MAKE AN INTERFACE FOR THE MAPPER CLASS. VIRTUAL DISPATCH WILL
// ADD TO THE ALREADY EXISTING PENALTY OF USING THIS METHODOLOGY. WE CREATED
// THIS CLASS SINCE WE CAN HAVE PERFORMANCE ADVANTAGE WITH ALTERNATE/EVEN_ODD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
#include <iostream>
#include <tuple>
#include <vector>
#include <limits>
#include <assert.h>

#include "helper_data_structures.hpp"

Expand Down Expand Up @@ -186,8 +188,9 @@ template <class EdgeType> class PushRelabelSolver {
template <class EdgeType>
PushRelabelSolver<EdgeType>::PushRelabelSolver(
std::vector<std::vector<EdgeType>> &adjacency_list, int source, int sink)
: _adjacency_list(adjacency_list), _source(source), _sink(sink),
_vertex_queue(vector_based_queue<int>(adjacency_list.size())) {
: _sink(sink), _source(source),
_vertex_queue(vector_based_queue<int>(adjacency_list.size())), _adjacency_list(adjacency_list)
{
_num_global_relabels = 0;
_num_gap_relabels = 0;
_num_gap_vertices = 0;
Expand Down
Loading