Skip to content

Commit

Permalink
Build fix (#358)
Browse files Browse the repository at this point in the history
* Fix warning.

Signed-off-by: TemplateVoid <anatoly.yakshov@gmail.com>
  • Loading branch information
TemplateVoid authored Jun 21, 2021
1 parent aefabd3 commit 2574506
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 9 additions & 4 deletions NeoMathEngine/src/CPU/CPUInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ limitations under the License.

#pragma once

#if !FINE_ARCHITECTURE( FINE_ARM64 )
#if !FINE_ARCHITECTURE( FINE_ARM64 ) && !FINE_ARCHITECTURE( FINE_ARM )

#if FINE_PLATFORM( FINE_DARWIN ) || FINE_PLATFORM( FINE_LINUX )
#if FINE_PLATFORM( FINE_DARWIN ) || FINE_PLATFORM( FINE_LINUX ) || FINE_PLATFORM( FINE_ANDROID ) || FINE_PLATFORM( FINE_IOS )
#include <cpuid.h>
#elif FINE_PLATFORM( FINE_WINDOWS )
#include <intrin.h>
Expand Down Expand Up @@ -188,23 +188,28 @@ struct CCPUInfo {

static void callCpuId( Regs& outRegs, const RegType& eax ) {
outRegs = { 0, 0, 0, 0 };
#if !FINE_ARCHITECTURE( FINE_ARM64 )
#if !FINE_ARCHITECTURE( FINE_ARM64 ) || !FINE_ARCHITECTURE( FINE_ARM )
#if FINE_PLATFORM(FINE_WINDOWS)
__cpuid( ( RegType* )( &outRegs ), eax );
#elif FINE_PLATFORM(FINE_LINUX) || FINE_PLATFORM(FINE_DARWIN)
__get_cpuid( eax, &outRegs.eax, &outRegs.ebx, &outRegs.ecx, &outRegs.edx );
#endif
#else
( void ) eax;
#endif // !FINE_ARCHITECTURE( FINE_ARM64 )
}

static void callCpuIdEx( Regs& outRegs, const RegType& eax, const RegType& ecx ) {
outRegs = { 0, 0, 0, 0 };
#if !FINE_ARCHITECTURE( FINE_ARM64 )
#if !FINE_ARCHITECTURE( FINE_ARM64 ) && !FINE_ARCHITECTURE( FINE_ARM )
#if FINE_PLATFORM(FINE_WINDOWS)
__cpuidex((RegType*)( &outRegs ), eax, ecx );
#elif FINE_PLATFORM(FINE_LINUX) || FINE_PLATFORM(FINE_DARWIN)
__cpuid_count( eax, ecx, outRegs.eax, outRegs.ebx, outRegs.ecx, outRegs.edx );
#endif
#else
( void ) eax;
( void ) ecx;
#endif // !FINE_ARCHITECTURE( FINE_ARM64 )
}

Expand Down
3 changes: 1 addition & 2 deletions NeoMathEngine/src/GPU/Metal/MetalMathEngineVectorMath.mm
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@
ASSERT_EXPR( kernel.Run( 0, 0, 1 ) );
}

void CMetalMathEngine::VectorSumAlongDimension( const CConstFloatHandle& firstHandle, int precedingDimension, int dimension,
int followingDimension, const CFloatHandle& resultHandle )
void CMetalMathEngine::VectorSumAlongDimension( const CConstFloatHandle&, int, int, int, const CFloatHandle& )
{
ASSERT_EXPR( false );
}
Expand Down

0 comments on commit 2574506

Please sign in to comment.