-
-
Save avramidis/6a6fb617367c45dfade3c41a935ae604 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SGVector<float64_t> result; | |
auto param_value = param->get_value(); | |
int64_t len; | |
auto f_scalar = [this, &len](auto value) { return 1;}; | |
auto f_vector = [this, &len, param_value](auto value) { return ((SGVector<float64_t>)value).vlen; }; | |
auto f_matrix = [this, &len, param_value](auto value) { return ((SGMatrix<float64_t>)value).num_rows*((SGMatrix<float64_t>)value).num_cols; }; | |
sg_any_dispatch(param->get_value(), sg_all_typemap, f_scalar, f_vector, f_matrix); | |
result=SGVector<float64_t>(len); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h: In instantiation of ‘Check shogun::type_internal::execute_function_check_return_type(Check, const shogun::Any&, FunctorT) [with T = shogun::CMeanFunction*; Check = shogun::type_internal::assert_return_type_is_valid; FunctorT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>]’:
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:278:41: required from ‘decltype (execute_function_check_return_type(shogun::type_internal::check_lambda_return{}, any, func)) shogun::type_internal::execute_function_check_arity(shogun::type_internal::ok, const shogun::Any&, FunctorT) [with T = shogun::CMeanFunction*; TraitsT = shogun::type_internal::auto_function_traits<shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>, int>; FunctorT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>; decltype (execute_function_check_return_type(shogun::type_internal::check_lambda_return{}, any, func)) = shogun::type_internal::assert_return_type_is_valid]’
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:294:43: required from ‘decltype (execute_function_check_arity<T, Traits>(shogun::type_internal::check_lambda_arity{}, any, func)) shogun::type_internal::execute_function_checks(const shogun::Any&, FunctorT) [with T = shogun::CMeanFunction*; Traits = shogun::type_internal::auto_function_traits<shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>, int>; FunctorT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>; decltype (execute_function_check_arity<T, Traits>(shogun::type_internal::check_lambda_arity{}, any, func)) = shogun::type_internal::assert_return_type_is_valid]’
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:316:38: required from ‘decltype (execute_function_checks<T, traits>(any, primitive_func)) shogun::type_internal::execute_function(const shogun::Any&, PrimitiveLambdaT, VectorLambdaT, MatrixLambdaT) [with T = shogun::CMeanFunction*; PrimitiveLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>; VectorLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:2)>; MatrixLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:3)>; traits = shogun::type_internal::auto_function_traits<shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>, int>; std::enable_if_t<(shogun::type_internal::is_sg_primitive::value && (! shogun::type_internal::is_none::value))>* = 0; decltype (execute_function_checks<T, traits>(any, primitive_func)) = shogun::type_internal::assert_return_type_is_valid]’
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:400:44: recursively required from ‘decltype (execute_function(any, primitive_func, vector_func, matrix_func)) shogun::type_internal::sg_type_finder(const shogun::Any&, shogun::TYPE, PrimitiveLambdaT, VectorLambdaT, MatrixLambdaT) [with TypeList = shogun::Types<char, signed char, unsigned char, short int, short unsigned int, int, unsigned int, long int, long unsigned int, float, double, long double, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::CSGObject*, shogun::CKernel*, shogun::CLikelihoodModel*, shogun::CMeanFunction*>; PrimitiveLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>; VectorLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:2)>; MatrixLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:3)>; typename std::enable_if<(! std::is_same<typename TypeList::Head, shogun::None>::value)>::type* = 0; decltype (execute_function(any, primitive_func, vector_func, matrix_func)) = shogun::type_internal::assert_return_type_is_valid; typename TypeList::Head = char]’
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:400:44: required from ‘decltype (execute_function(any, primitive_func, vector_func, matrix_func)) shogun::type_internal::sg_type_finder(const shogun::Any&, shogun::TYPE, PrimitiveLambdaT, VectorLambdaT, MatrixLambdaT) [with TypeList = shogun::Types<bool, char, signed char, unsigned char, short int, short unsigned int, int, unsigned int, long int, long unsigned int, float, double, long double, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::CSGObject*, shogun::CKernel*, shogun::CLikelihoodModel*, shogun::CMeanFunction*>; PrimitiveLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>; VectorLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:2)>; MatrixLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:3)>; typename std::enable_if<(! std::is_same<typename TypeList::Head, shogun::None>::value)>::type* = 0; decltype (execute_function(any, primitive_func, vector_func, matrix_func)) = shogun::type_internal::assert_return_type_is_valid; typename TypeList::Head = bool]’
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:522:43: required from ‘decltype (sg_type_findershogun::SG_TYPES(any, shogun::type_internal::get_type(any, typesmap), primitive_func, vector_func, matrix_func)) shogun::sg_any_dispatch(const shogun::Any&, const typemap&, PrimitiveLambdaT, VectorLambdaT, MatrixLambdaT) [with PrimitiveLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:1)>; VectorLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:2)>; MatrixLambdaT = shogun::CEPInferenceMethod::get_derivative_wrt_kernel(const shogun::AnyParameter*)::<lambda(auto:3)>; decltype (sg_type_findershogun::SG_TYPES(any, shogun::type_internal::get_type(any, typesmap), primitive_func, vector_func, matrix_func)) = shogun::type_internal::assert_return_type_is_valid; shogun::SG_TYPES = shogun::Types<bool, char, signed char, unsigned char, short int, short unsigned int, int, unsigned int, long int, long unsigned int, float, double, long double, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGVector, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::SGMatrix, shogun::CSGObject*, shogun::CKernel*, shogun::CLikelihoodModel*, shogun::CMeanFunction*>; shogun::typemap = std::unordered_map<std::type_index, shogun::TYPE>]’
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/machine/gp/EPInferenceMethod.cpp:521:82: required from here
/home/ea461/Workfolder/shogun_project/shogun/src/shogun/lib/type_case.h:263:3: warning: no return statement in function returning non-void [-Wreturn-type]