mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fixing warnings
This commit is contained in:
parent
d1c9b4b24f
commit
979a695f62
@ -947,9 +947,9 @@ namespace ngcore
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
Archive& ApplyHash(T val)
|
Archive& ApplyHash(T val)
|
||||||
{
|
{
|
||||||
auto n = sizeof(T);
|
size_t n = sizeof(T);
|
||||||
char* pval = (char*)&val;
|
char* pval = (char*)&val;
|
||||||
for(int i = 0; i < n; i++)
|
for(size_t i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
h[offset++] ^= pval[i];
|
h[offset++] ^= pval[i];
|
||||||
offset %= 8;
|
offset %= 8;
|
||||||
|
@ -40,7 +40,7 @@ namespace ngcore
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename ... ARGS>
|
template <typename ... ARGS>
|
||||||
ostream & operator<< (ostream & ost, Tuple<ARGS...> tup)
|
ostream & operator<< (ostream & ost, Tuple<ARGS...> /* tup */)
|
||||||
{
|
{
|
||||||
return ost;
|
return ost;
|
||||||
}
|
}
|
||||||
@ -1227,7 +1227,7 @@ namespace ngcore
|
|||||||
|
|
||||||
|
|
||||||
template <typename ... ARGS>
|
template <typename ... ARGS>
|
||||||
size_t ArraySize (Tuple<ARGS...> tup)
|
size_t ArraySize (Tuple<ARGS...> /* tup */)
|
||||||
{ return 0;}
|
{ return 0;}
|
||||||
|
|
||||||
template <typename ... ARGS>
|
template <typename ... ARGS>
|
||||||
@ -1240,7 +1240,7 @@ namespace ngcore
|
|||||||
|
|
||||||
|
|
||||||
template <typename T, typename ... ARGS>
|
template <typename T, typename ... ARGS>
|
||||||
void StoreToArray (FlatArray<T> a, Tuple<ARGS...> tup) { ; }
|
void StoreToArray (FlatArray<T> /* a */, Tuple<ARGS...> /* tup */) { ; }
|
||||||
|
|
||||||
template <typename T, typename ... ARGS>
|
template <typename T, typename ... ARGS>
|
||||||
void StoreToArray (FlatArray<T> a, Tuple<int,ARGS...> tup)
|
void StoreToArray (FlatArray<T> a, Tuple<int,ARGS...> tup)
|
||||||
|
@ -198,9 +198,9 @@ public:
|
|||||||
return reinterpret_cast<T*> (oldp);
|
return reinterpret_cast<T*> (oldp);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Delete(void* p) {}
|
virtual void Delete(void* /* p */) {}
|
||||||
|
|
||||||
virtual void ArrayDelete(void* p) {}
|
virtual void ArrayDelete(void* /* p */) {}
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
#ifndef __CUDA_ARCH__
|
#ifndef __CUDA_ARCH__
|
||||||
@ -211,7 +211,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/// free memory (dummy function)
|
/// free memory (dummy function)
|
||||||
NETGEN_INLINE void Free (void * data) throw ()
|
NETGEN_INLINE void Free (void * /* data */) throw ()
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -438,21 +438,21 @@ namespace ngcore
|
|||||||
#else // NETGEN_TRACE_MEMORY
|
#else // NETGEN_TRACE_MEMORY
|
||||||
public:
|
public:
|
||||||
MemoryTracer() {}
|
MemoryTracer() {}
|
||||||
MemoryTracer( std::string name ) {}
|
MemoryTracer( std::string /* name */ ) {}
|
||||||
template <typename... TRest>
|
template <typename... TRest>
|
||||||
MemoryTracer( std::string name, TRest & ... ) {}
|
MemoryTracer( std::string /* name */, TRest & ... ) {}
|
||||||
|
|
||||||
void Alloc(size_t size) const {}
|
void Alloc(size_t /* size */) const {}
|
||||||
void Free(size_t size) const {}
|
void Free(size_t /* size */) const {}
|
||||||
void Swap(...) const {}
|
void Swap(...) const {}
|
||||||
int GetId() const { return 0; }
|
int GetId() const { return 0; }
|
||||||
|
|
||||||
template <typename... TRest>
|
template <typename... TRest>
|
||||||
void Track(TRest&...) const {}
|
void Track(TRest&...) const {}
|
||||||
|
|
||||||
static std::string GetName(int id) { return ""; }
|
static std::string GetName(int /* id */) { return ""; }
|
||||||
std::string GetName() const { return ""; }
|
std::string GetName() const { return ""; }
|
||||||
void SetName(std::string name) const {}
|
void SetName(std::string /* name */) const {}
|
||||||
#endif // NETGEN_TRACE_MEMORY
|
#endif // NETGEN_TRACE_MEMORY
|
||||||
};
|
};
|
||||||
} // namespace ngcore
|
} // namespace ngcore
|
||||||
|
@ -192,7 +192,7 @@ namespace ngcore
|
|||||||
|
|
||||||
using FlatTable<T,IndexType>::operator[];
|
using FlatTable<T,IndexType>::operator[];
|
||||||
|
|
||||||
NETGEN_INLINE void StartMemoryTracing (int mem_id)
|
NETGEN_INLINE void StartMemoryTracing (int /* mem_id */)
|
||||||
{
|
{
|
||||||
mt.Alloc(GetMemUsage());
|
mt.Alloc(GetMemUsage());
|
||||||
}
|
}
|
||||||
|
@ -1068,11 +1068,11 @@ public:
|
|||||||
{
|
{
|
||||||
static Timer timer("ComputeColoring - "+Demangle(typeid(Tmask).name())); RegionTimer rt(timer);
|
static Timer timer("ComputeColoring - "+Demangle(typeid(Tmask).name())); RegionTimer rt(timer);
|
||||||
static_assert(sizeof(unsigned int)==4, "Adapt type of mask array");
|
static_assert(sizeof(unsigned int)==4, "Adapt type of mask array");
|
||||||
auto n = colors.Size();
|
size_t n = colors.Size();
|
||||||
|
|
||||||
Array<unsigned int> mask(ndofs);
|
Array<unsigned int> mask(ndofs);
|
||||||
|
|
||||||
int colored_blocks = 0;
|
size_t colored_blocks = 0;
|
||||||
|
|
||||||
// We are coloring with 32 colors at once and use each bit to mask conflicts
|
// We are coloring with 32 colors at once and use each bit to mask conflicts
|
||||||
unsigned int check = 0;
|
unsigned int check = 0;
|
||||||
|
@ -20,12 +20,12 @@ namespace ngcore
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
xbool (bool b) : state(b ? 2 : 0) { ; }
|
xbool (bool b) : state(b ? 2 : 0) { ; }
|
||||||
xbool (TMAYBE x) : state(1) { ; }
|
xbool (TMAYBE /* x */) : state(1) { ; }
|
||||||
xbool () = default;
|
xbool () = default;
|
||||||
xbool (const xbool &) = default;
|
xbool (const xbool &) = default;
|
||||||
|
|
||||||
xbool & operator= (bool b) { state = b ? 2 : 0; return *this; }
|
xbool & operator= (bool b) { state = b ? 2 : 0; return *this; }
|
||||||
xbool & operator= (TMAYBE x) { state = 1; return *this; }
|
xbool & operator= (TMAYBE /* x */) { state = 1; return *this; }
|
||||||
|
|
||||||
bool IsTrue () const { return state == 2; }
|
bool IsTrue () const { return state == 2; }
|
||||||
bool IsMaybe () const { return state == 1; }
|
bool IsMaybe () const { return state == 1; }
|
||||||
|
Loading…
Reference in New Issue
Block a user