Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeflectPlugin improvements #626

Merged
merged 1 commit into from
Dec 6, 2018
Merged

Conversation

tribal-tec
Copy link
Contributor

No description provided.

@tribal-tec
Copy link
Contributor Author

retest this please

_extensions.emplace_back(createFunc(argc, argv));
_libs.push_back(std::move(library));
BRAYNS_INFO << "Loaded plugin '" << name << "'" << std::endl;
if (auto plugin = createFunc(argc, argv))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we print an error in the case of createFunc returning nullptr?

Copy link
Contributor

@hernando hernando Dec 5, 2018

Choose a reason for hiding this comment

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

I would delegate that to createFunc. Because using exceptions in extern "C" functions is not possible, is it?

@@ -212,7 +212,7 @@ void PropertyMap::merge(const PropertyMap& input)
};
};

const auto isCompatbileTypes = [](Property::Type t0, Property::Type t1) {
const auto areCompatibleTypes = [](Property::Type t0, Property::Type t1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

const auto canBePromoted = [](Property::Type from, Property::Type to)

From the name is not clear in which order the conversion is allowed.

@tribal-tec tribal-tec force-pushed the deflect_plugin branch 2 times, most recently from 6e86043 to 2de9942 Compare December 5, 2018 16:57
- independent from core, all Deflect related code moved to the plugin
- move DeflectPixelOp into the plugin, --use-pixelop activates it
- commandline for the plugin handles --help to learn about the options
- add top-down option and yuv modes to the parameters for cmdline and JSON
@@ -212,7 +212,7 @@ void PropertyMap::merge(const PropertyMap& input)
};
};

const auto isCompatbileTypes = [](Property::Type t0, Property::Type t1) {
const auto areCompatibleTypes = [](Property::Type t0, Property::Type t1) {
return (t0 == Property::Type::Int && t1 == Property::Type::Double) ||
(t0 == Property::Type::Double && t1 == Property::Type::Int) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

This conversion should not be allowed @karjonas, any reason for allowing it?

Copy link
Contributor

Choose a reason for hiding this comment

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

When we get doubles from the UI they are sent as 0 instead of 0.0 so therefore we need to be able to convert between double and float.

Copy link
Contributor

Choose a reason for hiding this comment

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

But that would be a type promotion, which is fine. The condition is also accepting type demotion (accepting double for an integer), which is what I don't see why should be necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, should be fine, you just need to change the order in the jsonToPropertyMap method in jsonPropertyMap.h.

@tribal-tec tribal-tec merged commit dcbf75b into BlueBrain:master Dec 6, 2018
@tribal-tec tribal-tec deleted the deflect_plugin branch December 6, 2018 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants