Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c2719 error when using vs2015(v140) platform toolset #5

Open
zhengli233 opened this issue Nov 7, 2019 · 3 comments
Open

c2719 error when using vs2015(v140) platform toolset #5

zhengli233 opened this issue Nov 7, 2019 · 3 comments
Labels

Comments

@zhengli233
Copy link

I tried to compile my project in visual studio 2017 but with vs2015 (v140) platform toolset, and got many c2719 errors. With vs2017(v141) toolset, everything is fine.

@kouchy
Copy link
Member

kouchy commented Nov 7, 2019

Hi @zhengli233,

We do not support VS 2015 but could you give us at least one full compiler error to identify the problem more precisely?

@zhengli233
Copy link
Author

zhengli233 commented Nov 8, 2019

Hi @kouchy ,

Here is my simple test code with "/arch:AVX2" compile command:

#include "stdafx.h"
#include "mipp.h"

int main()
{
	uint8_t * arr = new uint8_t[256];
	memset(arr, 1, sizeof(uint8_t) * 256);

	mipp::Reg<uint8_t> vec1(arr);

	return 0;
}

and here are the errors:

------ Build started: Project: mipp_test, Configuration: Debug Win32 ------
mipp_test.cpp
f:\program files\mipp\src\mipp.h(850): error C2719: 'b': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp.h(856): error C2719: 'b': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp.h(856): error C2719: 'c': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp.h(880): error C2719: 'c': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(569): error C2719: 'r2': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(575): note: see reference to class template instantiation 'mipp::Regx2' being compiled
f:\program files\mipp\src\mipp_object.hxx(130): error C2719: 'v_shu': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(855): note: see reference to class template instantiation 'mipp::Reg' being compiled
f:\program files\mipp\src\mipp_object.hxx(131): error C2719: 'v_shu': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(132): error C2719: 'v_shu': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(133): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(134): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(135): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(136): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(137): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(138): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(139): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(140): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(141): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(143): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(146): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(147): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(149): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(150): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(153): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(154): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(155): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(156): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(157): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(158): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(159): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(160): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(161): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(162): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(163): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(164): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(166): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(168): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(170): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(193): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(193): error C2719: 'v2': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(194): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(194): error C2719: 'v2': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(195): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(195): error C2719: 'v2': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(196): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(196): error C2719: 'v2': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(197): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(204): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(295): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(307): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(310): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(313): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(316): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(321): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(326): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(331): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(341): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(342): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(343): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(344): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(345): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(346): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(374): error C2719: 'src': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(380): error C2719: 'src': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(380): error C2719: 'b': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(386): error C2719: 'src': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(386): error C2719: 'b': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(386): error C2719: 'c': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(398): error C2719: 'b': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(404): error C2719: 'b': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(404): error C2719: 'c': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(465): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(1481): note: see reference to class template instantiation 'mipp::Msk<8>' being compiled
f:\program files\mipp\src\mipp_object.hxx(466): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(468): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(469): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(472): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(496): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(501): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(506): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(2157): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
f:\program files\mipp\src\mipp_impl_avx.hxx(2992): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(2997): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3002): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3007): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3012): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3017): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3053): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3058): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3063): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3068): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
f:\program files\mipp\src\mipp_impl_avx.hxx(3106): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(3112): note: see reference to class template instantiation 'mipp::_Reduction<double,OP>' being compiled
f:\program files\mipp\src\mipp_impl_avx.hxx(3129): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(3136): note: see reference to class template instantiation 'mipp::_Reduction<float,OP>' being compiled
f:\program files\mipp\src\mipp_impl_avx.hxx(3152): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(3158): note: see reference to class template instantiation 'mipp::_Reduction<int64_t,OP>' being compiled
f:\program files\mipp\src\mipp_impl_avx.hxx(3175): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(3182): note: see reference to class template instantiation 'mipp::_Reduction<int32_t,OP>' being compiled
f:\program files\mipp\src\mipp_impl_avx.hxx(3209): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(3225): note: see reference to class template instantiation 'mipp::_Reduction<int16_t,OP>' being compiled
f:\program files\mipp\src\mipp_impl_avx.hxx(3257): error C2719: 'v1': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_impl_avx.hxx(3277): note: see reference to class template instantiation 'mipp::_Reduction<int8_t,OP>' being compiled
f:\program files\mipp\src\mipp_object.hxx(169): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(171): error C2719: 'v': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(197): error C2719: 'm': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(288): error C2719: 'm': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(289): error C2719: 'm': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(290): error C2719: 'm': formal parameter with requested alignment of 32 won't be aligned
f:\program files\mipp\src\mipp_object.hxx(291): error C2719: 'm': formal parameter with requested alignment of 32 won't be aligned
Done building project "mipp_test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

@kouchy
Copy link
Member

kouchy commented Nov 12, 2019

Hi @zhengli233,

Thx for the full trace.
At this time I don't understand why the compiler fails to align some variables :-/.

I will think about it.

@kouchy kouchy added the bug label Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants