How to creating GAS from a file with plain coordinate

I saw the example of raycasting with a helper function that can load a mesh from gltf file. But I only can read coordinates from a text file for each triangle. In the Triangle example, the GAS is generated from an array of float 3. Say if I want to read 10 triangle coordinates from a file and generate a GAS, Do I just create std::array<float3, 30> and just fill in the coordinates one after another? optixAccelBuild will know the first three are one triangle and the second three are for the second triangle? Is there a limitation on how many triangles can be used? And is the run time of building the GAS scale with the number of triangles linearly?

And int the raycasting
const std::array<float3, 3> vertices =
{ {
{ -0.5f, -0.5f, 0.0f },
{ 0.5f, -0.5f, 0.0f },
{ 0.0f, 0.5f, 0.0f }
} };

Thanks and regards

Say if I want to read 10 triangle coordinates from a file and generate a GAS, Do I just create std::array<float3, 30> and just fill in the coordinates one after another?

Yes.
https://raytracing-docs.nvidia.com/optix7/guide/index.html#acceleration_structures#acceleration-structures
https://raytracing-docs.nvidia.com/optix7/api/group__optix__host__api__acceleration__structures.html#gab3fdfe8ee81f725555b0be927fbaa44b

optixAccelBuild will know the first three are one triangle and the second three are for the second triangle?

Yes.
As described inside the OptixBuildInputTriangleArray structure, when you’re not providing indices, that is when the indexBuffer pointer is null, the data inside the vertexBuffers pointers (usually only one, when not using motion blur on geometry) will be interpreted as independent triangle data.
https://raytracing-docs.nvidia.com/optix7/api/struct_optix_build_input.html

Is there a limitation on how many triangles can be used?

Yes.
See the limits chapter inside the programming guide.
The current limit is 2^29 primitives per GAS.

And is the run time of building the GAS scale with the number of triangles linearly?

Not really. For GAS with fewer primitives, the constant overhead of the GPU kernel launches for the AS builds will result in a non-linear scaling. It depends on the GPU capabilities from which number of primitives the AS build will scale more or less linearly with the number of primitives.

Here are some more interesting forum threads about acceleration structures:
https://forums.developer.nvidia.com/t/what-is-built-in-triangle/177157
https://forums.developer.nvidia.com/t/bvh-building-algorithm-and-primitive-order/182231
This one is your own: https://forums.developer.nvidia.com/t/gas-rectangle-vs-triangle/183177
https://forums.developer.nvidia.com/t/render-quads/175532