Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sample json categories array

Wei, Jimmy T edited this pageMar 10, 2023 ·1 revision

sample.json Categories Array

This page is a partial example of how the"categories" key in thesample.json file is used by the sample browsers (Visual Studio, Eclipse, Visual Studio Code and CLI) to organize and present all of the available samples. For additional information on how the sample browsers consume this information see thesample browser wiki article.

To see the current organizational tree of released samples, use theoneapi-cli tool on Windows, Linux or Mac:

oneapi-cli --ignore-os

You can create a project from any sample presented by theoneapi-cli tooland inspect the"categories" key inside thesample.json file that isfound in the root folder of that project. Theoneapi-cli tool can be foundin thedev-utilities/latest/bin folder in any installation of theoneAPI Toolkits.

To determine which categories your sample should be placed, connect withthe Samples Working Group and the UI/UX team.

The categories presented here are for instruction only. The names and organization shown here do not define which category names should be used. They are here to help you understand how the"categories" field > defines a sample tree to be presented by the sample browsers.

An Example ofsample.json Category Tree Organization

NOTE: a sample can belong to more than one category. See the"categories" array section in theSample Browser Behaviorwiki page for more details.

At the time of this writing (September 2020), all categories begin with"Toolkit/" at the root, even if the categories are not toolkit names. Thisis a requirement of the current Samples Browser implementations.

Multiple levels in the category tree are allowed. The '/' character is used asa separator. You can think of the"categories" array as defining thelocation in a directory tree of the respective sample(s).

NOTE: Sorry, but it is not possible to use the '/' character as part ofa category name.

  • Getting Started
    • Getting Started Sample #1"categories": ["Toolkit/Getting Started"],
    • Getting Started Sample #2"categories": ["Toolkit/Getting Started"],
    • etc.
  • A Sample Major Category
    • A Sub-Category
      • Some Sample #1"categories": ["Toolkit/A Sample Major Category/A Sub-Category"],
      • Some Sample #2"categories": ["Toolkit/A Sample Major Category/A Sub-Category"],
      • ...
    • Another Sub-Category
      • Sub-Sub-Category
        • Another Sample #1"categories": ["Toolkit/A Sample Major Category/Another Sub-Category/Sub-Sub-Category"],
        • Another Sample #2"categories": ["Toolkit/A Sample Major Category/Another Sub-Category/Sub-Sub-Category"],
        • ...
      • Sub-Sub-#2
        • Sub Sub Sample #1"categories": ["Toolkit/A Sample Major Category/Another Sub-Category/Sub-Sub-#2"],
      • Sub-Sub-#3
        • Really Deep!
          • Deep Sample #1"categories": ["Toolkit/A Sample Major Category/Another Sub-Category/Sub-Sub-#3/Really Deep!"],
          • Deep Sample #2"categories": ["Toolkit/A Sample Major Category/Another Sub-Category/Sub-Sub-#3/Really Deep!"],
          • ...
    • More
      • More Samples #1"categories": ["Toolkit/A Sample Major Category/More"],
      • More Samples #2"categories": ["Toolkit/A Sample Major Category/More"],
      • ...
  • Another Major Category
    • Another Major Category Sample #1"categories": ["Toolkit/Another Major Category"],
    • Another Major Category Sample #2"categories": ["Toolkit/Another Major Category"],
    • Another Major Category Sample #3"categories": ["Toolkit/Another Major Category"],
    • Another Major Category Sample #4"categories": ["Toolkit/Another Major Category"],
    • ...
  • More!
    • Even More Samples #1"categories": ["Toolkit/More!"],
    • Even More Samples #2"categories": ["Toolkit/More!"],
    • Even More Samples #3"categories": ["Toolkit/More!"],
    • Even More Samples #4"categories": ["Toolkit/More!"],
    • Even More Samples #5"categories": ["Toolkit/More!"],
    • ...

Additional Information on DPC++ topics can be found in the book(pdf):

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp