int main()
{
	int Error = 0;

	Error += test_operators();
	Error += test_operator_increment();
	
	return Error;
}
int main()
{
	int Error = 0;

	glm::vec2 v;
	assert(v.length() == 2);

	Error += test_vec2_size();
	Error += test_vec2_ctor();
	Error += test_vec2_operators();
	Error += test_operator_increment();

	return Error;
}
Esempio n. 3
0
int main()
{
    int Error = 0;

    Error += test_vec3_ctor();
    Error += test_vec3_operators();
    Error += test_vec3_size();
    Error += test_vec3_swizzle3_2();
    Error += test_vec3_swizzle3_3();
    Error += test_vec3_swizzle_partial();
    Error += test_vec3_swizzle_operators();
    Error += test_vec3_swizzle_functions();
    Error += test_operator_increment();

    return Error;
}
int main()
{
	int Error = 0;

	glm::vec3 v;
	assert(v.length() == 3);

	Error += test_vec3_ctor();
	Error += test_vec3_operators();
	Error += test_vec3_size();
	Error += test_vec3_swizzle3_2();
	Error += test_vec3_swizzle3_3();
	Error += test_vec3_swizzle_partial();
	Error += test_vec3_swizzle_operators();
	Error += test_vec3_swizzle_functions();
	Error += test_operator_increment();

	return Error;
}
Esempio n. 5
0
int main()
{
	int Error = 0;

	glm::vec2 v;
	assert(v.length() == 2);

#	ifdef GLM_META_PROG_HELPERS
		assert(glm::vec2::components == glm::vec2().length());
		assert(glm::vec2::components == 2);
#	endif

	Error += test_vec2_size();
	Error += test_vec2_ctor();
	Error += test_vec2_operators();
	Error += test_operator_increment();

	return Error;
}
Esempio n. 6
0
int main()
{
	int Error(0);

	std::size_t const Size(1000000);

#	ifdef NDEBUG
		Error += test_vec4_perf_AoS(Size);
		Error += test_vec4_perf_SoA(Size);
#	endif//NDEBUG

	Error += test_vec4_ctor();
	Error += test_vec4_size();
	Error += test_vec4_operators();
	Error += test_vec4_swizzle_partial();
	Error += test_operator_increment();

	return Error;
}
Esempio n. 7
0
int main()
{
	int Error(0);
/*
	{
		glm::ivec4 const a1(2);
		glm::ivec4 const b1 = a1 >> 1;

		__m128i const e1 = _mm_set1_epi32(2);
		__m128i const f1 = _mm_srli_epi32(e1, 1);

		glm::ivec4 const g1 = *reinterpret_cast<glm::ivec4 const* const>(&f1);

		glm::ivec4 const a2(-2);
		glm::ivec4 const b2 = a2 >> 1;

		__m128i const e2 = _mm_set1_epi32(-1);
		__m128i const f2 = _mm_srli_epi32(e2, 1);

		glm::ivec4 const g2 = *reinterpret_cast<glm::ivec4 const* const>(&f2);

		printf("GNI\n");
	}

	{
		glm::uvec4 const a1(2);
		glm::uvec4 const b1 = a1 >> 1u;

		__m128i const e1 = _mm_set1_epi32(2);
		__m128i const f1 = _mm_srli_epi32(e1, 1);

		glm::uvec4 const g1 = *reinterpret_cast<glm::uvec4 const* const>(&f1);

		glm::uvec4 const a2(-1);
		glm::uvec4 const b2 = a2 >> 1u;

		__m128i const e2 = _mm_set1_epi32(-1);
		__m128i const f2 = _mm_srli_epi32(e2, 1);

		glm::uvec4 const g2 = *reinterpret_cast<glm::uvec4 const* const>(&f2);

		printf("GNI\n");
	}
*/
	glm::vec4 v;
	assert(v.length() == 4);

#	ifdef NDEBUG
		std::size_t const Size(1000000);
		Error += test_vec4_perf_AoS(Size);
		Error += test_vec4_perf_SoA(Size);
#	endif//NDEBUG

	Error += test_vec4_ctor();
	Error += test_bvec4_ctor();
	Error += test_vec4_size();
	Error += test_vec4_operators();
	Error += test_vec4_swizzle_partial();
	Error += test_vec4_simd();
	Error += test_operator_increment();
	Error += heap::test();

	return Error;
}