本文整理汇总了C++中USE函数的典型用法代码示例。如果您正苦于以下问题:C++ USE函数的具体用法?C++ USE怎么用?C++ USE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了USE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _swrast_choose_line
/**
* Determine which line drawing function to use given the current
* rendering context.
*
* Please update the summary flag _SWRAST_NEW_LINE if you add or remove
* tests to this code.
*/
void
_swrast_choose_line( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLboolean rgbmode = ctx->Visual.rgbMode;
GLboolean specular = (ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR));
if (ctx->RenderMode == GL_RENDER) {
if (ctx->Line.SmoothFlag) {
/* antialiased lines */
_swrast_choose_aa_line_function(ctx);
ASSERT(swrast->Line);
}
else if (ctx->Texture._EnabledCoordUnits
|| ctx->FragmentProgram._Current
|| swrast->_FogEnabled
|| specular) {
USE(general_line);
}
else if (ctx->Depth.Test
|| ctx->Line.Width != 1.0
|| ctx->Line.StippleFlag) {
/* no texture, but Z, fog, width>1, stipple, etc. */
if (rgbmode)
#if CHAN_BITS == 32
USE(general_line);
#else
USE(rgba_line);
#endif
else
USE(ci_line);
}
else {
示例2: RB_TROFF_Generate_Doc_End
void RB_TROFF_Generate_Doc_End(
FILE *dest_doc,
char *name )
{
USE( dest_doc );
USE( name );
}
示例3: exec
virtual void exec()
{
USE(READ, n, tsteps);
USE(READWRITE, A, B);
using exec_pol =
NestedPolicy<ExecList<omp_parallel_for_exec, simd_exec>,
Tile<TileList<tile_fixed<16>, tile_fixed<16>>>>;
for (int t = 0; t < tsteps; ++t) {
forallN<exec_pol>(
RangeSegment{1, n - 1},
RangeSegment{1, n - 1},
[=](int i, int j) {
B->at(i, j) =
static_cast<T>(0.2)
* (A->at(i, j) + A->at(i, j - 1) + A->at(i, 1 + j) + A->at(1 + i, j)
+ A->at(i - 1, j));
});
forallN<exec_pol>(
RangeSegment{1, n - 1},
RangeSegment{1, n - 1},
[=](int i, int j) {
A->at(i, j) =
static_cast<T>(0.2)
* (B->at(i, j) + B->at(i, j - 1) + B->at(i, 1 + j) + B->at(1 + i, j)
+ B->at(i - 1, j));
});
}
}
示例4: init
virtual void init()
{
USE(READ, n);
USE(READWRITE, A);
Arr2D<T> *B = new Arr2D<T>{n, n};
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++)
A->at(i, j) = static_cast<T>(-j % n) / n + 1;
for (int j = i + 1; j < n; j++) {
A->at(i, j) = 0;
}
A->at(i, i) = 1;
}
for (int r = 0; r < n; ++r)
for (int s = 0; s < n; ++s)
B->at(r, s) = 0;
for (int t = 0; t < n; ++t)
for (int r = 0; r < n; ++r)
for (int s = 0; s < n; ++s)
B->at(r, s) += A->at(r, t) * A->at(s, t);
for (int r = 0; r < n; ++r)
for (int s = 0; s < n; ++s)
A->at(r, s) = B->at(r, s);
delete B;
}
示例5: _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw
// Clearly duplicated and should be in a common place...
static Eina_Bool
_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd, Ector_Rop op, Eina_Array *clips, unsigned int mul_col)
{
if (pd->pat) return EINA_FALSE;
Ector_Renderer_Generic_Gradient_Radial_Data *gld;
// FIXME: don't ignore clipping !
gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
if (!pd->pat || !gld) return EINA_FALSE;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, mul_col));
USE(obj, cairo_arc, EINA_FALSE);
USE(obj, cairo_fill, EINA_FALSE);
cairo_arc(pd->parent->cairo,
gld->radial.x, gld->radial.y,
gld->radius,
0, 2 * M_PI);
eo_do(obj, ector_renderer_cairo_base_fill());
cairo_fill(pd->parent->cairo);
return EINA_TRUE;
}
示例6: init
virtual void init()
{
USE(READ, ni, nj, nk, nl);
USE(READWRITE, A, B, C, D);
using init_pol = NestedPolicy<ExecList<simd_exec, simd_exec>>;
forallN<init_pol>(
RangeSegment{0, ni},
RangeSegment{0, nk},
[=](int i, int k) {
A->at(i, k) = static_cast<T>((i * k + 1) % ni) / ni;
});
forallN<init_pol>(
RangeSegment{0, nk},
RangeSegment{0, ni},
[=](int k, int i) {
B->at(k, i) = static_cast<T>(k * (i + 1) % ni) / ni;
});
forallN<init_pol>(
RangeSegment{0, nj},
RangeSegment{0, nl},
[=](int j, int l) {
C->at(j, l) = static_cast<T>((j * (l + 3) + 1) % nl) / nl;
});
forallN<init_pol>(
RangeSegment{0, ni},
RangeSegment{0, nl},
[=](int i, int l) {
D->at(i, l) = static_cast<T>(i * (l + 2) % nk) / nk;
});
}
示例7: exec
virtual void exec()
{
USE(READ, n);
USE(READWRITE, A, y, x, b);
forall<simd_exec>(0, n, [=](int i) {
forall<simd_exec>(0, i, [=](int j) {
ReduceSum<seq_reduce, T> w{-A->at(i, j)};
forall<simd_exec>(0, j, [=](int k) { w += A->at(i, k) * A->at(k, j); });
A->at(i, j) = -w / A->at(j, j);
});
forall<simd_exec>(i, n, [=](int j) {
ReduceSum<seq_reduce, T> w{-A->at(i, j)};
forall<simd_exec>(0, i, [=](int k) { w += A->at(i, k) * A->at(k, j); });
A->at(i, j) = -w;
});
});
forall<simd_exec>(0, n, [=](int i) {
ReduceSum<seq_reduce, T> w{-b->at(i)};
forall<simd_exec>(0, i, [=](int j) { w += A->at(i, j) * y->at(j); });
y->at(i) = -w;
});
forall<simd_exec>(0, n, [=](int i_) {
int i = n - (i_ + 1);
ReduceSum<seq_reduce, T> w{-y->at(i)};
forall<simd_exec>(i + 1, n, [=](int j) { w += A->at(i, j) * x->at(j); });
x->at(i) = -w / A->at(i, i);
});
}
示例8: init
virtual void init()
{
USE(READ, n, fn);
USE(READWRITE, A, x, y, b);
Arr2D<T> *B = new Arr2D<T>{n, n};
forall<simd_exec>(0, n, [=](int i) {
x->at(i) = static_cast<T>(0);
y->at(i) = static_cast<T>(0);
b->at(i) = (i + 1) / fn / static_cast<T>(2.0) + 4;
});
forallN<NestedPolicy<ExecList<simd_exec, simd_exec>>>(
RangeSegment{0, n},
RangeSegment{0, n},
[=](int i, int j) {
A->at(i, j) = (j < i) ? (static_cast<T>(-j % n) / n + 1) : (i == j);
});
forallN<NestedPolicy<ExecList<simd_exec, simd_exec>>>(
RangeSegment{0, n},
RangeSegment{0, n},
[=](int r, int s) { B->at(r, s) = 0; });
forallN<NestedPolicy<ExecList<simd_exec, simd_exec, simd_exec>>>(
RangeSegment{0, n},
RangeSegment{0, n},
RangeSegment{0, n},
[=](int r, int s, int t) { B->at(r, s) += A->at(r, t) * A->at(s, t); });
forallN<NestedPolicy<ExecList<simd_exec, simd_exec>>>(
RangeSegment{0, n},
RangeSegment{0, n},
[=](int r, int s) { A->at(r, s) = B->at(r, s); });
delete B;
}
示例9: RB_RTF_Generate_Label
void RB_RTF_Generate_Label(
FILE *dest_doc,
char *name )
{
USE( dest_doc );
USE( name );
/* Empty */
}
示例10: SetICMProfileW
BOOL WINAPI SetICMProfileW(HDC hdc, LPWSTR pszFileName)
{
USE(hdc);
USE(pszFileName);
GdiSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return(FALSE);
}
示例11: init
virtual void init()
{
USE(READ, m, n);
USE(READWRITE, data);
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
data->at(i, j) = static_cast<T>(i * j) / m + i;
}
示例12: dotelltc
/*ARGSUSED*/
void
dotelltc(Char **v, struct command *c)
{
USE(v);
USE(c);
if (!GotTermCaps)
GetTermCaps();
TellTC();
}
示例13: GetICMProfileW
BOOL WINAPI GetICMProfileW(HDC hdc, DWORD szBuffer, LPWSTR pBuffer)
{
USE(hdc);
USE(pBuffer);
USE(szBuffer);
GdiSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return(FALSE);
}
示例14: init
virtual void init()
{
USE(READ, n);
USE(READWRITE, A, B);
for (int i = 0; i < n; i++) {
A->at(i) = (static_cast<T>(i) + 2) / n;
B->at(i) = (static_cast<T>(i) + 3) / n;
}
}
示例15: UpdateICMRegKeyW
BOOL WINAPI UpdateICMRegKeyW(DWORD Reserved,PWSTR szICMMatcher,PWSTR szFileName,DWORD Command)
{
USE(Reserved);
USE(szICMMatcher);
USE(szFileName);
USE(Command);
GdiSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return(FALSE);
}