Skip to content

Rework UnaryOpNode - #627

Draft
arcondello wants to merge 2 commits into
dwavesystems:mainfrom
arcondello:feature/unaryop-rework
Draft

Rework UnaryOpNode#627
arcondello wants to merge 2 commits into
dwavesystems:mainfrom
arcondello:feature/unaryop-rework

Conversation

@arcondello

@arcondello arcondello commented Aug 26, 2026

Copy link
Copy Markdown
Member

Very much a work in progress. But putting it up so folks can see how #626 is intended to be used.

AI Generation Disclosure

Claude helped a lot with this one. Mostly by catching edge cases in the funcs, implementing a few of them once I showed it the pattern (e.g., rint) and by helping to write the tests. In the end, most of the code was actually written by me once I made all the changes I wanted.

The changes to UnaryOpNode didn't use any AI.

@arcondello
arcondello force-pushed the feature/unaryop-rework branch 2 times, most recently from c5d1e4b to ab1eb6a Compare August 27, 2026 20:31
@arcondello
arcondello force-pushed the feature/unaryop-rework branch from ab1eb6a to 1d53fd1 Compare August 27, 2026 20:41
auto p_ptr = graph.emplace_node<UnaryOpNode<TestType>>(a_ptr);
auto* p_ptr = graph.emplace_node<UnaryOpNode<TestType>>(a_ptr);

graph.emplace_node<ArrayValidationNode>(p_ptr);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was modified more than the others as part of fixing a bug. I figure the changes are for the better but are not so important that we need to propagate them to all other tests.

using LogicalNode = UnaryOpNode<functional::logical>;
extern template class UnaryOpNode<functional::logical>;

using NegativeNode = UnaryOpNode<functional::negate>;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now that these are all ops we define rather than std:: ones, we should rename them to be consistent with the nodes.

@arcondello arcondello added the enhancement New feature or request label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant