Comments (3)
As i mentioned in another issue: Compiler should be able to deduce overloading here. But if it doesn't - i would try to move poly_postsmooth() and poly_presmooth() functions to partially specialized class/struct with general template throwing "not supported" error.
Something like
template<class T_Config>
struct poly_smooth
{
static void poly_postsmooth(const Matrix<T_Config> &A, const Vector<T_Config> &B, Vector<T_Config> &C, cusp::relaxation::polynomial<typename T_Config::MatPrec, typename T_Config::MemSpace> &poly)
{
FatalError("Mixed precision is not supported for scalar matrix type", AMGX_ERR_NOT_IMPLEMENTED);
}
static void poly_presmooth(const Matrix<T_Config> &A, const Vector<T_Config> &B, Vector<T_Config> &C, cusp::relaxation::polynomial<typename T_Config::MatPrec, typename T_Config::MemSpace> &poly)
{
FatalError("Mixed precision is not supported for scalar matrix type", AMGX_ERR_NOT_IMPLEMENTED);
}
}
template<AMGX_MemorySpace t_memSpace, AMGX_IndPrecision t_indInt>
struct poly_smooth<TemplateConfig<t_memSpace, AMGX_vecDouble, AMGX_matDouble, t_indInt>>
{
static void poly_postsmooth(...){...};
static void poly_presmooth(...){...};
}
template<AMGX_MemorySpace t_memSpace, AMGX_IndPrecision t_indInt>
struct poly_smooth<TemplateConfig<t_memSpace, AMGX_vecFloat, AMGX_matFloat, t_indInt>>
{
static void poly_postsmooth(...){...};
static void poly_presmooth(...){...};
}
...
poly_smooth<T_Config>::poly_postsmooth(...);
...
I might be a little off on that, but that's the general idea.
from amgx.
JFYI, solution above works for VS2017, i will patch code little bit later
from amgx.
Will there be a release anytime soon with a compiling version on VS2017? I'd like to give AMGX a try but I haven't gotten anywhere on Windows.
from amgx.
Related Issues (20)
- [Build] Build Error with MVAPICH2-GDR HOT 5
- Seeking Advice on Configuring AMGX for Solving a Poorly-Conditioned Matrix Equation
- Seeking Advice on Configuring AMGX for Solving a Poorly-Conditioned Matrix Equation HOT 2
- [Issue] Recovering from out of memory error
- [Build] OKay to ENABLE NvToolsExt for Windows? HOT 2
- [Build] CMake Error in Windows with GCC HOT 3
- [Build] _NV_IF__NV_TARGET_BOOL_NV_PROVIDES_SM_90 is undefined HOT 1
- Error trying to build an app that uses AmgX HOT 6
- AMGX Fails to Converge to the Correct Solution HOT 2
- Seeking advice for setting up solver for finite element HOT 4
- [Issue]solution depends on the number of levels of AMG grid HOT 4
- AMGX crashed due to out of memory[Issue] HOT 1
- Caught amgx exception: Cannot allocate pinned memory HOT 3
- [Build] Error with thrust HOT 7
- [Issue]Caught amgx exception: SelectorFactory 'PMIS' has not been registered HOT 10
- "Cannot allocate pinned memory" error on a supercomputer HOT 5
- Caught amgx exception: getFixedSizesForView should not be called by a non-distributed matrix
- Matrix with number of nonzero more than 2147483647 HOT 2
- [Issue] "Reorder_cols_by_color" error when using MULTICOLOR_ILU
- [How can I use the eigensolvers configs in eigen_examples?]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amgx.