Changeset View
Changeset View
Standalone View
Standalone View
source/lib/sse.h
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
/* Copyright (C) 2020 Wildfire Games. | |||||||||||||||
* | |||||||||||||||
* Permission is hereby granted, free of charge, to any person obtaining | |||||||||||||||
* a copy of this software and associated documentation files (the | |||||||||||||||
* "Software"), to deal in the Software without restriction, including | |||||||||||||||
* without limitation the rights to use, copy, modify, merge, publish, | |||||||||||||||
* distribute, sublicense, and/or sell copies of the Software, and to | |||||||||||||||
* permit persons to whom the Software is furnished to do so, subject to | |||||||||||||||
* the following conditions: | |||||||||||||||
* | |||||||||||||||
* The above copyright notice and this permission notice shall be included | |||||||||||||||
* in all copies or substantial portions of the Software. | |||||||||||||||
* | |||||||||||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||||||||||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |||||||||||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||||||||||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | |||||||||||||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |||||||||||||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |||||||||||||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||||||||||||
*/ | |||||||||||||||
#ifndef INCLUDED_SSE | |||||||||||||||
#define INCLUDED_SSE | |||||||||||||||
#include "sysdep/compiler.h" | |||||||||||||||
#if HAVE_SSE | |||||||||||||||
extern bool HasSSE(); | |||||||||||||||
vladislavbelov: `Have` and `has` are a bit contradicting each other. If you already have SSE, why do you need… | |||||||||||||||
Done Inline ActionsMacro is COMPILER_HAS_SSE while the other is hostmachinehassse Stan: Macro is COMPILER_HAS_SSE while the other is hostmachinehassse | |||||||||||||||
Done Inline ActionsSo, you see that it's not a good naming. vladislavbelov: So, you see that it's not a good naming. | |||||||||||||||
#endif | |||||||||||||||
Done Inline ActionsHow do you expect to inline the extern function in case of no usages inside cpp? vladislavbelov: How do you expect to inline the `extern` function in case of no usages inside `cpp`? | |||||||||||||||
Done Inline ActionsMagic ? Stan: Magic ?
Also if have sse there is always the function and if not it's not defined so no problem | |||||||||||||||
Done Inline ActionsIf you (as a compiler) have no body how do you expect to inline? (Except some compiler extensions). vladislavbelov: If you (as a compiler) have no body how do you expect to inline? (Except some compiler… | |||||||||||||||
Done Inline Actions
This needs to always be defined, or your code won't compile on computers that don't HAVE_SSE. wraitii: This needs to always be defined, or your code won't compile on computers that don't HAVE_SSE. | |||||||||||||||
#endif INCLUDED_SSE |
Wildfire Games · Phabricator
Have and has are a bit contradicting each other. If you already have SSE, why do you need to check it again?