当前位置: 首页>>代码示例>>C++>>正文


C++ USE函数代码示例

本文整理汇总了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 {
开发者ID:aljen,项目名称:haiku-opengl,代码行数:42,代码来源:s_lines.c

示例2: RB_TROFF_Generate_Doc_End

void RB_TROFF_Generate_Doc_End(
    FILE *dest_doc,
    char *name )
{
    USE( dest_doc );
    USE( name );
}
开发者ID:Prakti,项目名称:ROBODoc,代码行数:7,代码来源:troff_generator.c

示例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));
       });
   }
 }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:28,代码来源:jacobi-2d.hpp

示例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;
 }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:25,代码来源:lu.hpp

示例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;
}
开发者ID:FlorentRevest,项目名称:EFL,代码行数:26,代码来源:ector_renderer_cairo_gradient_radial.c

示例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;
      });
  }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:34,代码来源:2mm.hpp

示例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);
   });
 }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:28,代码来源:ludcmp.hpp

示例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;
 }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:31,代码来源:ludcmp.hpp

示例9: RB_RTF_Generate_Label

void RB_RTF_Generate_Label(
    FILE *dest_doc,
    char *name )
{
    USE( dest_doc );
    USE( name );
    /* Empty */
}
开发者ID:Prakti,项目名称:ROBODoc,代码行数:8,代码来源:rtf_generator.c

示例10: SetICMProfileW

BOOL WINAPI SetICMProfileW(HDC hdc, LPWSTR pszFileName)
{
    USE(hdc);
    USE(pszFileName);
    GdiSetLastError(ERROR_CALL_NOT_IMPLEMENTED);

    return(FALSE);
}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:8,代码来源:icm.c

示例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;
 }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:8,代码来源:correlation.hpp

示例12: dotelltc

/*ARGSUSED*/
void
dotelltc(Char **v, struct command *c)
{
    USE(v);
    USE(c);
    if (!GotTermCaps)
	GetTermCaps();
    TellTC();
}
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:10,代码来源:tc.func.c

示例13: GetICMProfileW

BOOL WINAPI GetICMProfileW(HDC hdc, DWORD szBuffer, LPWSTR pBuffer)
{
    USE(hdc);
    USE(pBuffer);
    USE(szBuffer);
    GdiSetLastError(ERROR_CALL_NOT_IMPLEMENTED);

    return(FALSE);
}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:9,代码来源:icm.c

示例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;
   }
 }
开发者ID:willkill07,项目名称:PolyBench-RAJA,代码行数:9,代码来源:jacobi-1d.hpp

示例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);
}
开发者ID:Gaikokujin,项目名称:WinNT4,代码行数:10,代码来源:icm.c


注:本文中的USE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。