Interoperability with C for Fortran parameters: Why can one not use the parameter key word when trying to make a variable seen on the C side. This
出于保存中间结果的需要,这里出现了更多的“spill”及堆栈[RSP + ...]访问。 问题的答案很简单:2 *(i * i)比2 * i * i更快,因为针对前者JIT生成的汇编代码更优化。 但是,显然这两个版本都不够好。由于x86-64 CPU都至少支持SSE2,因此循环可以从向量化中受益。 因此,这是optimizer的问题:通常循环过度展开...
type, parameter, bind(c,name='myName' :: iConst = 2 Subscribe More actions john3 Beginner 02-05-2010 06:21 AM 1,006 Views Interoperability with C for Fortran parameters: Why can one not use the parameter key word when trying to make a variable seen on...
Why can one not use the parameter key word when trying to make a variable seen on the C side. This works: integer(4), bind(c,name='myName') :: myname This does not (C side can not find the name) integer(4), parameter, bind(C,name-'myConst') :: myConst = 3...
Why can one not use the parameter key word when trying to make a variable seen on the C side. This works: integer(4), bind(c,name='myName') :: myname This does not (C side can not find the name) integer(4), parameter, bind(C,name-'myConst') :: myConst = 3...