Krita Source Code Documentation
Loading...
Searching...
No Matches
bspline_data.cpp File Reference
#include "local_definitions.h"
#include <stdlib.h>

Go to the source code of this file.

Macros

#define __USE_XOPEN2K
 
#define _XOPEN_SOURCE   600
 

Functions

void init_sse_data ()
 

Variables

const double A44d [16]
 
const float A44f [16]
 
const double *restrict Ad = A44d
 
const float *restrict Af = A44f
 
const double d2A44d [16]
 
const float d2A44f [16]
 
const double *restrict d2Ad = d2A44d
 
const float *restrict d2Af = d2A44f
 
const double d3A44d [16]
 
const float d3A44f [16]
 
const double *restrict d3Ad = d3A44d
 
const float *restrict d3Af = d3A44f
 
const double dA44d [16]
 
const float dA44f [16]
 
const double *restrict dAd = dA44d
 
const float *restrict dAf = dA44f
 

Macro Definition Documentation

◆ __USE_XOPEN2K

#define __USE_XOPEN2K

Definition at line 36 of file bspline_data.cpp.

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   600

Definition at line 33 of file bspline_data.cpp.

Function Documentation

◆ init_sse_data()

void init_sse_data ( )

Definition at line 62 of file bspline_data.cpp.

63{
64#ifdef HAVE_SSE
65 if (A_s == 0) {
66 posix_memalign ((void**)&A_s, 16, (sizeof(__m128)*12));
67 A_s[0] = _mm_setr_ps ( 1.0/6.0, -3.0/6.0, 3.0/6.0, -1.0/6.0 );
68 A_s[0] = _mm_setr_ps ( 1.0/6.0, -3.0/6.0, 3.0/6.0, -1.0/6.0 );
69 A_s[1] = _mm_setr_ps ( 4.0/6.0, 0.0/6.0, -6.0/6.0, 3.0/6.0 );
70 A_s[2] = _mm_setr_ps ( 1.0/6.0, 3.0/6.0, 3.0/6.0, -3.0/6.0 );
71 A_s[3] = _mm_setr_ps ( 0.0/6.0, 0.0/6.0, 0.0/6.0, 1.0/6.0 );
72 A_s[4] = _mm_setr_ps ( -0.5, 1.0, -0.5, 0.0 );
73 A_s[5] = _mm_setr_ps ( 0.0, -2.0, 1.5, 0.0 );
74 A_s[6] = _mm_setr_ps ( 0.5, 1.0, -1.5, 0.0 );
75 A_s[7] = _mm_setr_ps ( 0.0, 0.0, 0.5, 0.0 );
76 A_s[8] = _mm_setr_ps ( 1.0, -1.0, 0.0, 0.0 );
77 A_s[9] = _mm_setr_ps ( -2.0, 3.0, 0.0, 0.0 );
78 A_s[10] = _mm_setr_ps ( 1.0, -3.0, 0.0, 0.0 );
79 A_s[11] = _mm_setr_ps ( 0.0, 1.0, 0.0, 0.0 );
80 }
81
82#endif
83#ifdef HAVE_SSE2
84 if (A_d == 0) {
85 posix_memalign ((void**)&A_d, 16, (sizeof(__m128d)*24));
86 A_d[ 0] = _mm_setr_pd ( 3.0/6.0, -1.0/6.0 );
87 A_d[ 1] = _mm_setr_pd ( 1.0/6.0, -3.0/6.0 );
88 A_d[ 2] = _mm_setr_pd ( -6.0/6.0, 3.0/6.0 );
89 A_d[ 3] = _mm_setr_pd ( 4.0/6.0, 0.0/6.0 );
90 A_d[ 4] = _mm_setr_pd ( 3.0/6.0, -3.0/6.0 );
91 A_d[ 5] = _mm_setr_pd ( 1.0/6.0, 3.0/6.0 );
92 A_d[ 6] = _mm_setr_pd ( 0.0/6.0, 1.0/6.0 );
93 A_d[ 7] = _mm_setr_pd ( 0.0/6.0, 0.0/6.0 );
94 A_d[ 8] = _mm_setr_pd ( -0.5, 0.0 );
95 A_d[ 9] = _mm_setr_pd ( -0.5, 1.0 );
96 A_d[10] = _mm_setr_pd ( 1.5, 0.0 );
97 A_d[11] = _mm_setr_pd ( 0.0, -2.0 );
98 A_d[12] = _mm_setr_pd ( -1.5, 0.0 );
99 A_d[13] = _mm_setr_pd ( 0.5, 1.0 );
100 A_d[14] = _mm_setr_pd ( 0.5, 0.0 );
101 A_d[15] = _mm_setr_pd ( 0.0, 0.0 );
102 A_d[16] = _mm_setr_pd ( 0.0, 0.0 );
103 A_d[17] = _mm_setr_pd ( 1.0, -1.0 );
104 A_d[18] = _mm_setr_pd ( 0.0, 0.0 );
105 A_d[19] = _mm_setr_pd ( -2.0, 3.0 );
106 A_d[20] = _mm_setr_pd ( 0.0, 0.0 );
107 A_d[21] = _mm_setr_pd ( 1.0, -3.0 );
108 A_d[22] = _mm_setr_pd ( 0.0, 0.0 );
109 A_d[23] = _mm_setr_pd ( 0.0, 1.0 );
110 }
111#endif
112}
int posix_memalign(void **memptr, size_t alignment, size_t size)

References posix_memalign().

Variable Documentation

◆ A44d

const double A44d[16]
Initial value:
=
{ -1.0/6.0, 3.0/6.0, -3.0/6.0, 1.0/6.0,
3.0/6.0, -6.0/6.0, 0.0/6.0, 4.0/6.0,
-3.0/6.0, 3.0/6.0, 3.0/6.0, 1.0/6.0,
1.0/6.0, 0.0/6.0, 0.0/6.0, 0.0/6.0 }

Definition at line 176 of file bspline_data.cpp.

177 { -1.0/6.0, 3.0/6.0, -3.0/6.0, 1.0/6.0,
178 3.0/6.0, -6.0/6.0, 0.0/6.0, 4.0/6.0,
179 -3.0/6.0, 3.0/6.0, 3.0/6.0, 1.0/6.0,
180 1.0/6.0, 0.0/6.0, 0.0/6.0, 0.0/6.0 };

◆ A44f

const float A44f[16]
Initial value:
=
{ -1.0/6.0, 3.0/6.0, -3.0/6.0, 1.0/6.0,
3.0/6.0, -6.0/6.0, 0.0/6.0, 4.0/6.0,
-3.0/6.0, 3.0/6.0, 3.0/6.0, 1.0/6.0,
1.0/6.0, 0.0/6.0, 0.0/6.0, 0.0/6.0 }

Definition at line 145 of file bspline_data.cpp.

146 { -1.0/6.0, 3.0/6.0, -3.0/6.0, 1.0/6.0,
147 3.0/6.0, -6.0/6.0, 0.0/6.0, 4.0/6.0,
148 -3.0/6.0, 3.0/6.0, 3.0/6.0, 1.0/6.0,
149 1.0/6.0, 0.0/6.0, 0.0/6.0, 0.0/6.0 };

◆ Ad

const double* restrict Ad = A44d

Definition at line 181 of file bspline_data.cpp.

◆ Af

const float* restrict Af = A44f

Definition at line 150 of file bspline_data.cpp.

◆ d2A44d

const double d2A44d[16]
Initial value:
=
{ 0.0, 0.0, -1.0, 1.0,
0.0, 0.0, 3.0, -2.0,
0.0, 0.0, -3.0, 1.0,
0.0, 0.0, 1.0, 0.0 }

Definition at line 190 of file bspline_data.cpp.

191 { 0.0, 0.0, -1.0, 1.0,
192 0.0, 0.0, 3.0, -2.0,
193 0.0, 0.0, -3.0, 1.0,
194 0.0, 0.0, 1.0, 0.0 };

◆ d2A44f

const float d2A44f[16]
Initial value:
=
{ 0.0, 0.0, -1.0, 1.0,
0.0, 0.0, 3.0, -2.0,
0.0, 0.0, -3.0, 1.0,
0.0, 0.0, 1.0, 0.0 }

Definition at line 159 of file bspline_data.cpp.

160 { 0.0, 0.0, -1.0, 1.0,
161 0.0, 0.0, 3.0, -2.0,
162 0.0, 0.0, -3.0, 1.0,
163 0.0, 0.0, 1.0, 0.0 };

◆ d2Ad

const double* restrict d2Ad = d2A44d

Definition at line 195 of file bspline_data.cpp.

◆ d2Af

const float* restrict d2Af = d2A44f

Definition at line 164 of file bspline_data.cpp.

◆ d3A44d

const double d3A44d[16]
Initial value:
=
{ 0.0, 0.0, 0.0, -1.0,
0.0, 0.0, 0.0, 3.0,
0.0, 0.0, 0.0, -3.0,
0.0, 0.0, 0.0, 1.0}

Definition at line 197 of file bspline_data.cpp.

198 { 0.0, 0.0, 0.0, -1.0,
199 0.0, 0.0, 0.0, 3.0,
200 0.0, 0.0, 0.0, -3.0,
201 0.0, 0.0, 0.0, 1.0};

◆ d3A44f

const float d3A44f[16]
Initial value:
=
{ 0.0, 0.0, 0.0, -1.0,
0.0, 0.0, 0.0, 3.0,
0.0, 0.0, 0.0, -3.0,
0.0, 0.0, 0.0, 1.0}

Definition at line 166 of file bspline_data.cpp.

167 { 0.0, 0.0, 0.0, -1.0,
168 0.0, 0.0, 0.0, 3.0,
169 0.0, 0.0, 0.0, -3.0,
170 0.0, 0.0, 0.0, 1.0};

◆ d3Ad

const double* restrict d3Ad = d3A44d

Definition at line 202 of file bspline_data.cpp.

◆ d3Af

const float* restrict d3Af = d3A44f

Definition at line 171 of file bspline_data.cpp.

◆ dA44d

const double dA44d[16]
Initial value:
=
{ 0.0, -0.5, 1.0, -0.5,
0.0, 1.5, -2.0, 0.0,
0.0, -1.5, 1.0, 0.5,
0.0, 0.5, 0.0, 0.0 }

Definition at line 183 of file bspline_data.cpp.

184 { 0.0, -0.5, 1.0, -0.5,
185 0.0, 1.5, -2.0, 0.0,
186 0.0, -1.5, 1.0, 0.5,
187 0.0, 0.5, 0.0, 0.0 };

◆ dA44f

const float dA44f[16]
Initial value:
=
{ 0.0, -0.5, 1.0, -0.5,
0.0, 1.5, -2.0, 0.0,
0.0, -1.5, 1.0, 0.5,
0.0, 0.5, 0.0, 0.0 }

Definition at line 152 of file bspline_data.cpp.

153 { 0.0, -0.5, 1.0, -0.5,
154 0.0, 1.5, -2.0, 0.0,
155 0.0, -1.5, 1.0, 0.5,
156 0.0, 0.5, 0.0, 0.0 };

◆ dAd

const double* restrict dAd = dA44d

Definition at line 188 of file bspline_data.cpp.

◆ dAf

const float* restrict dAf = dA44f

Definition at line 157 of file bspline_data.cpp.