A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
/* SPDX-FileCopyrightText: 2023 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup fn
|
|
*/
|
|
|
|
#include "FN_lazy_function_execute.hh"
|
|
|
|
namespace blender::fn::lazy_function {
|
|
|
|
BasicParams::BasicParams(const LazyFunction &fn,
|
|
const Span<GMutablePointer> inputs,
|
|
const Span<GMutablePointer> outputs,
|
|
MutableSpan<std::optional<ValueUsage>> input_usages,
|
|
Span<ValueUsage> output_usages,
|
|
MutableSpan<bool> set_outputs)
|
|
: Params(fn, true),
|
|
inputs_(inputs),
|
|
outputs_(outputs),
|
|
input_usages_(input_usages),
|
|
output_usages_(output_usages),
|
|
set_outputs_(set_outputs)
|
|
{
|
|
}
|
|
|
|
void *BasicParams::try_get_input_data_ptr_impl(const int index) const
|
|
{
|
|
return inputs_[index].get();
|
|
}
|
|
|
|
void *BasicParams::try_get_input_data_ptr_or_request_impl(const int index)
|
|
{
|
|
void *value = inputs_[index].get();
|
|
if (value == nullptr) {
|
|
input_usages_[index] = ValueUsage::Used;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
void *BasicParams::get_output_data_ptr_impl(const int index)
|
|
{
|
|
return outputs_[index].get();
|
|
}
|
|
|
|
void BasicParams::output_set_impl(const int index)
|
|
{
|
|
set_outputs_[index] = true;
|
|
}
|
|
|
|
bool BasicParams::output_was_set_impl(const int index) const
|
|
{
|
|
return set_outputs_[index];
|
|
}
|
|
|
|
ValueUsage BasicParams::get_output_usage_impl(const int index) const
|
|
{
|
|
return output_usages_[index];
|
|
}
|
|
|
|
void BasicParams::set_input_unused_impl(const int index)
|
|
{
|
|
input_usages_[index] = ValueUsage::Unused;
|
|
}
|
|
|
|
bool BasicParams::try_enable_multi_threading_impl()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} // namespace blender::fn::lazy_function
|