unsigned char some_function () { static struct some_struct ss __attribute__ ((section (".cmem"))); static struct some_struct tt; ss.a = other_func (ss.a); tt.a = other_func (tt.a); return 0; }
// // ------------------------------------------------------------- // int main() { std::cout << "*****************" << std::endl; std::cout << "* Test started! *" << std::endl; std::cout << "*****************" << std::endl; viennamath::function_symbol u(0); //an unknown function viennamath::equation strong_form = viennamath::make_equation( viennamath::laplace(u), 1); std::cout << "Strong (classical) form of equation:" << std::endl; std::cout << " " << strong_form << std::endl; viennamath::equation weak_form_general = viennafem::make_weak_form(strong_form); //this is the external linkage check: other_func(); std::cout << "*******************************" << std::endl; std::cout << "* Test finished successfully! *" << std::endl; std::cout << "*******************************" << std::endl; return EXIT_SUCCESS; }
// // ------------------------------------------------------------- // int main() { typedef float NumericType; //doing nothing but instantiating a few types viennacl::scalar<NumericType> s; viennacl::vector<NumericType> v(10); viennacl::matrix<NumericType> m(10, 10); viennacl::compressed_matrix<NumericType> compr(10, 10); viennacl::coordinate_matrix<NumericType> coord(10, 10); //this is the external linkage check: other_func(); std::cout << std::endl; std::cout << "------- Test completed --------" << std::endl; std::cout << std::endl; return EXIT_SUCCESS; }
int main() { some_process ( ); other_func( 56 ); }