Skip to content

Commit

Permalink
Build fix (#360)
Browse files Browse the repository at this point in the history
* Add MKL_USE_STATIC_LIBS in FindMKL.cmake

Signed-off-by: TemplateVoid <anatoly.yakshov@gmail.com>

* Some refactoring

Signed-off-by: TemplateVoid <anatoly.yakshov@gmail.com>

* Small fix

Signed-off-by: TemplateVoid <anatoly.yakshov@gmail.com>

* fix warnings

Signed-off-by: TemplateVoid <anatoly.yakshov@gmail.com>

Co-authored-by: Stanislav Angeliuk <59917951+SAngeliuk@users.noreply.github.com>
  • Loading branch information
TemplateVoid and SAngeliuk authored Jun 21, 2021
1 parent 4d3839d commit 1210a8a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
17 changes: 10 additions & 7 deletions NeoMathEngine/src/CPU/CPUInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ limitations under the License.

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

#if FINE_PLATFORM( FINE_DARWIN ) || FINE_PLATFORM( FINE_LINUX ) || FINE_PLATFORM( FINE_ANDROID ) || FINE_PLATFORM( FINE_IOS )
#if FINE_PLATFORM( FINE_DARWIN ) || FINE_PLATFORM( FINE_LINUX )
#include <cpuid.h>
#elif FINE_PLATFORM( FINE_WINDOWS )
#include <intrin.h>
#else
#error "Platform isn't supported!"
#endif

#endif // !FINE_ARCHITECTURE( FINE_ARM64 )
Expand Down Expand Up @@ -189,10 +187,12 @@ struct CCPUInfo {
static void callCpuId( Regs& outRegs, const RegType& eax ) {
outRegs = { 0, 0, 0, 0 };
#if !FINE_ARCHITECTURE( FINE_ARM64 ) || !FINE_ARCHITECTURE( FINE_ARM )
#if FINE_PLATFORM(FINE_WINDOWS)
#if FINE_PLATFORM( FINE_WINDOWS )
__cpuid( ( RegType* )( &outRegs ), eax );
#elif FINE_PLATFORM(FINE_LINUX) || FINE_PLATFORM(FINE_DARWIN)
#elif FINE_PLATFORM( FINE_LINUX ) || FINE_PLATFORM( FINE_DARWIN )
__get_cpuid( eax, &outRegs.eax, &outRegs.ebx, &outRegs.ecx, &outRegs.edx );
#else
( void ) eax;
#endif
#else
( void ) eax;
Expand All @@ -202,10 +202,13 @@ struct CCPUInfo {
static void callCpuIdEx( Regs& outRegs, const RegType& eax, const RegType& ecx ) {
outRegs = { 0, 0, 0, 0 };
#if !FINE_ARCHITECTURE( FINE_ARM64 ) && !FINE_ARCHITECTURE( FINE_ARM )
#if FINE_PLATFORM(FINE_WINDOWS)
#if FINE_PLATFORM( FINE_WINDOWS )
__cpuidex((RegType*)( &outRegs ), eax, ecx );
#elif FINE_PLATFORM(FINE_LINUX) || FINE_PLATFORM(FINE_DARWIN)
#elif FINE_PLATFORM( FINE_LINUX ) || FINE_PLATFORM( FINE_DARWIN )
__cpuid_count( eax, ecx, outRegs.eax, outRegs.ebx, outRegs.ecx, outRegs.edx );
#else
( void ) eax;
( void ) ecx;
#endif
#else
( void ) eax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ struct TailProcessorRight<Kernel, typename SFINAEFilter<typename Kernel::TailKer
size_t cRowSize, size_t k, float* cTmp, size_t height, size_t width)
{
using CKernel = typename Kernel::TailKernelRight;
int a = CKernel::width;
int b = Kernel::width;
const size_t bStep = CKernel::width * k;
for( ; width >= CKernel::width; width -= CKernel::width ) {
if( height >= CKernel::height ) {
Expand Down
3 changes: 1 addition & 2 deletions NeoMathEngine/src/GPU/Vulkan/VulkanMathEngineVectorMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,7 @@ void CVulkanMathEngine::VectorNegSum(const CConstFloatHandle& firstHandle, int v
runVectorShader(shaderData, &param, sizeof(param), 0, 0, 0, 0, bufs, sizes, 2, shaderData.GetGroupSize());
}

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

0 comments on commit 1210a8a

Please sign in to comment.